I am creating a deepcopy of a Matrix in SageMath.
import copy
A = Matrix([[1,2],[3,4]]).augment(Matrix.identity(2), subdivide=True)
B = copy.deepcopy(A)
print A
print B
Gives me:
[1 2|1 0]
[3 4|0 1]
[1 2 1 0]
[3 4 0 1]
What is the correct way to deepcopy a matrix with the subdivision? Do I have to use:
B.subdivide(*A.subdivisions())
SageMath version 7.2, Release Date: 2016-05-15
Answer by tmonteil at https://ask.sagemath.org/question/36134/deepcopy-of-a-matrix-sagemath/?answer=36137#post-id-36137
It seems that sage has a custom method
but not a custom method