[Numpy-discussion] Assigning complex values to a real array

Stéfan van der Walt stefan at sun.ac.za
Sat Mar 7 05:10:10 EST 2009


2009/3/7 Robert Kern <robert.kern at gmail.com>:
> In [5]: z = zeros(3, int)
>
> In [6]: z[1] = 1.5
>
> In [7]: z
> Out[7]: array([0, 1, 0])

Blind moment, sorry.  So, what is your take -- should this kind of
thing pass silently?

Regards
Stéfan



More information about the NumPy-Discussion mailing list