[Numpy-discussion] switching to float32

David Goldsmith d_l_goldsmith@yahoo....
Sat Jun 27 10:06:51 CDT 2009


--- On Sat, 6/27/09, Dag Sverre Seljebotn <dagss@student.matnat.uio.no> wrote:

> Note that it is relatively easy for you to do e.g.
> 
> default_dtype = np.float32
> 
> def array(*args, **kw):
>      if 'dtype' not in kw.keys():
>          return np.array(*args, **kw, dtype=default_dtype)
>      else:
>          return np.array(*args, **kw)

Perhaps this could be added to the Cookbook.

DG

> 
> and so on in your own codebase, avoiding the problem.
> 
> -- 
> Dag Sverre
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
> 


      


More information about the Numpy-discussion mailing list