1 | initial version |
The reason is that a specific __copy__
method was written for matrices, but not a __deepcopy__
one, hence copy.deepcopy
falls back to a generic method which does not care about the subdivision. As you can see, the copy works well:
sage: C = copy.copy(A)
sage: C
[1 2|1 0]
[3 4|0 1]
and you can check in its source code that a special care of subdivision is made:
sage: A.__copy__??
If you need this feature, let me suggest to add a __deepcopy__
method in Sage source code.