[Numpy-discussion] Can dtype be set universally?

Chris Barker chris.barker at noaa.gov
Thu May 22 18:31:54 EDT 2014


On Thu, May 22, 2014 at 4:57 AM, Dinesh Vadhia <dineshbvadhia at hotmail.com>wrote:

>  In a 64-bit environment, is it possible to universally set the dtype to
> 32-bit for all ints, floats etc. to avoid setting the dtype individually
> for each array object and calculations?
>

huh?

there is no 32 bit for all ints, floats, etc...

numpy has defaults for various array constructors. Most of them default to
either double for a floating point type, or an integer that matches the
python standard integer.

On 64 bit python on *nix of OS-X, I think this means you'll get a 64 bit
integer by default, from, for example:

np.arange(4)

I don't think the default float types depend on the bit-depth of the python
you are running with.

I don't think you can change any of those defaults.

-Chris





>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>


-- 

Christopher Barker, Ph.D.
Oceanographer

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140522/61d77929/attachment.html>


More information about the NumPy-Discussion mailing list