krastano...@gmail.com
unread,May 12, 2012, 7:41:50 AM5/12/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sy...@googlegroups.com
One can do this:
In [20]: a = Matrix([1,2,3])
In [21]: a[0:1,0]=[5]
In [22]: a
Out[22]:
⎡5⎤
⎢ ⎥
⎢2⎥
⎢ ⎥
⎣3⎦
In [23]: a[0:2,0]=[10,20]
In [24]: a
Out[24]:
⎡10⎤
⎢ ⎥
⎢20⎥
⎢ ⎥
⎣3 ⎦
And also this:
In [31]: a = eye(3)
In [32]: a[0:2,0:2] = 3*eye(2)
In [33]: a
Out[33]:
⎡3 0 0⎤
⎢ ⎥
⎢0 3 0⎥
⎢ ⎥
⎣0 0 1⎦
And the __setitem__ method is not using any code from copyin_*. Is
this duplication of code and generally duplication of functionality?