Ask Your Question

Revision history [back]

It does this:

sage: M = identity_matrix(2)
sage: M
[1 0]
[0 1]
sage: M = 4
sage: M
4

In the noteboook, the most recent evaluated cell with M= ... will erase the previous affectation of the variable M.

It does this:

sage: M = identity_matrix(2)
sage: M
[1 0]
[0 1]
sage: M = 4
sage: M
4

In the noteboook, the most recent evaluated cell with M= ... will erase the previous affectation of the variable M.

The magic function %whos returns a table of type/value for each current variables that are defined and as you see, only one value is assigned to each variable:

sage: %whos
Variable   Type                                Data/Info
--------------------------------------------------------
M          Integer                             4