[Numpy-discussion] seting the dtype for where...

Christopher Barker Chris.Barker at noaa.gov
Fri Dec 1 17:55:41 CST 2006

Robert Kern wrote:

> Well, it's consistent with all of the other coercion rules:
> In [6]: (array(5.0, dtype=float32) + 0).dtype
> Out[6]: dtype('float64')

duh! of course. If I use a float32 scalar for BOTH the operands, then I 
get a float32 array out. Thanks,


Christopher Barker, Ph.D.

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov

More information about the Numpy-discussion mailing list