[Numpy-discussion] possible bug in assignment to complex array

Mark Bakker markbak@gmail....
Wed Aug 8 15:09:45 CDT 2012

Dear List,

I think there is a problem with assigning a 1D complex array of length one
to a position in another complex array.


a = ones(1,'D')
b = ones(1,'D')
a[0] = b
TypeError                                 Traceback (most recent call last)
<ipython-input-37-0c4fc6d780e3> in <module>()
----> 1 a[0] = b

TypeError: can't convert complex to float

This works correctly when a and b are real arrays:

a = ones(1)
b = ones(1)
a[0] = b

Bug or feature?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120808/722304ae/attachment.html 

More information about the NumPy-Discussion mailing list