On 30/06/2006, at 10:11 PM, Travis Oliphant wrote:

> I should have worded this as:
>
> "People who want arange to return floats *as a default* should be
> directed to linspace"
>
> So, basically, arange is not going to change.
>
> Because of this, shifting over was a cinch.   I still need to write  
> the
> convert-script code that inserts dtype=int
> in routines that use old defaults:  *plea* anybody want to write  
> that??

Hmm ... couldn't we make the transition easier and more robust by  
writing compatibility interfaces for zeros, ones, empty, called e.g.  
intzeros, intones, intempty?  These functions could of course live in  
oldnumeric.py.  Then we can get convertcode.py to do a simple search  
and replace -- and, more importantly, it's easy for users to do the  
same manually should they choose not to use convertcode.py.

I could work on this this weekend.

I'm pleased we're changing the defaults to float.  The combination of  
the int defaults and silent downcasting with in-place operators trips  
me up once every few months when I forget to specify dtype=float  
explicitly.  Another wart gone from NumPy!  I'm surprised and  
impressed that the community's willing to make this change after 10+  
years with int defaults.  I think it's a small but important  
improvement in usability.

-- Ed


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to