[Numpy-discussion] switching to float32

David Goldsmith d_l_goldsmith at yahoo.com
Sat Jun 27 11:06:51 EDT 2009


--- On Sat, 6/27/09, Dag Sverre Seljebotn <dagss at 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 at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
> 


      



More information about the NumPy-Discussion mailing list