[Numpy-discussion] preventing coercion of matrix
Warren Focke
focke at slac.stanford.edu
Tue Mar 13 00:55:25 EST 2001
That's what the savespace argument to the array constructors is for:
>>> a=Numeric.array(range(4), typecode='f', savespace=1)
>>> a.itemsize()
4
>>> b=a*1.0
>>> b.itemsize()
4
wbf
On Mon, 12 Mar 2001, Mathew Yeates wrote:
> Is there some to prevent the upcast? I realize Python only has double
> datatypes but still .... that shouldnt prevent me from have floats in
> my object.
More information about the NumPy-Discussion
mailing list