On Nov 8, 2007 11:32 AM, Michael McNeil Forbes <[EMAIL PROTECTED]>
wrote:
> Hi,
>
> Is it possible or easy to add a warning and/or error when array
> assignments are made that lose information? I just got caught with
> the following type of code:
>
> def f():
> return numpy.array([1j,2.0])
>
Hi,
Is it possible or easy to add a warning and/or error when array
assignments are made that lose information? I just got caught with
the following type of code:
def f():
return numpy.array([1j,2.0])
x = numpy.empty((2,),dtype=float)
x[:] = f()
I am pre-allocating arrays for speed, b