我正在SageMath中创建一个矩阵的深度拷贝。
import copy
A = Matrix([[1,2],[3,4]]).augment(Matrix.identity(2), subdivide=True)
B = copy.deepcopy(A)
print A
print B给我:
[1 2|1 0]
[3 4|0 1]
[1 2 1 0]
[3 4 0 1]用细分深化复制矩阵的正确方法是什么?我是否必须使用:
B.subdivide(*A.subdivisions())SageMath版本7.2,发布日期: 2016-05-15
发布于 2017-01-01 18:05:52
tmonteil在https://ask.sagemath.org/question/36134/deepcopy-of-a-matrix-sagemath/?answer=36137#post-id-36137上的回答
似乎鼠尾草有一种定制的方法
__copy__但不是一个定制的方法
__deepcopy__https://stackoverflow.com/questions/41322359
复制相似问题