[SciPy-user] TypeError: object has read-only attributes
Nils Wagner
nwagner at mecha.uni-stuttgart.de
Fri Jul 25 07:30:26 EDT 2003
Hi all,
I would like to change an entry of a complex array.
>>> t
array([ 0.30993965+0.21102825j, 0.40232318+0.48098591j,
0.30927754+0.3310895j , 0.36197345+0.36041015j])
>>> t[0]
(0.30993964566340926+0.21102825078044135j)
>>> t[0].real
0.30993964566340926
>>> t[0].real=0
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: object has read-only attributes
>>> t[0]=1
>>> t[0]
(1+0j)
>>>
What's the trouble ?
Nils
More information about the SciPy-User
mailing list