[Numpy-discussion] Assigning complex value to real array
Thu Oct 7 17:17:27 CDT 2010
Thu, 07 Oct 2010 18:02:43 -0400, Andrew P. Mullhaupt wrote:
> On 10/7/2010 3:45 PM, firstname.lastname@example.org wrote:
>> what's your namespace?from scipy import log
> This should explain:
> >>> R = ones(2)
> >>> R = R * 1j
> >>> R
> array([ 0., 1.])
As Charles and Anne said:
> Newer versions of numpy will warn you that the imaginary part is
> going to be discarded in your first example.
This will possibly be strengthened to an error or NaN in the future.
More information about the NumPy-Discussion