[Numpy-discussion] Why arange has no stop-point opt-in?
Thu Dec 30 08:57:50 CST 2010
On 2010-12-30 16:43:12 +0200, firstname.lastname@example.org said:
> Since linspace exists, I don't see much point in adding the stop point
> in arange. I use arange mainly for integers as numpy equivalent of
> python's range. And I often need arange(n+1) which is less writing
> than arange(n, include_end_point=True)
I agree with the point of writing gets more in some cases.
But arange(a, n+1, 0.1) would of course fail in this case.
And the big difference is, that I need to calculate first how many
steps it is for linspace to achieve what I believe is a frequent user
As we already have the 'convenience' of both linspace and arange, which
in principle could be done by one function alone if we'd precalculate
all required information ourselves, why not go the full way, and take
all overhead away from the user?
>> NumPy-Discussion mailing list
More information about the NumPy-Discussion