[Numpy-discussion] Time for beta1 of NumPy 1.0
oliphant at ee.byu.edu
Fri Jun 30 15:25:23 EDT 2006
Robert Kern wrote:
>Travis Oliphant wrote:
>Whatever else you do, leave arange() alone. It should never have accepted floats
>in the first place.
Actually, Robert makes a good point. arange with floats is
problematic. We should direct people to linspace instead of changing
the default of arange. Most new users will probably expect arange to
return a type similar to Python's range which is int.
Also: Keeping arange as ints reduces the number of errors from the
change in the unit tests to
2 in NumPy
3 in SciPy
So, I think from both a pragmatic and idealized situtation, arange
should stay with the default of ints. People who want arange to return
floats should be directed to linspace.
More information about the NumPy-Discussion