[Numpy-discussion] Was the range() function ever created?
tmrsg11 at gmail.com
Sat May 25 01:05:30 EDT 2019
I somehow missed Juan's reply.
Yes, I think Juan solved the problem.
On Sat, May 25, 2019 at 12:57 AM Robert Kern <robert.kern at gmail.com> wrote:
> On Fri, May 24, 2019 at 9:33 PM C W <tmrsg11 at gmail.com> wrote:
>> Thank you, Robert. I will take it up to the Pandas-dev mailing list.
>> I'm not sure if I follow you on "right semantics for the shape of the
>> output." Range is just a summary statistic which is a number.
>> I'm not an expert, but wouldn't something like this do?
>> def range(vec):
>> return np.max(vec) - np.min(vec)
> Oh.You referenced the R range() function, which returns the minimum and
> the maximum as separate numbers, not their difference.
> And the pandas issue that you referenced was asking for the same.
> In fact, numpy does have the function you are looking for, as Juan noted.
> It's called `ptp()` (early numpy developers tended to be more from a signal
> processing background than a statistics background).
> Robert Kern
> NumPy-Discussion mailing list
> NumPy-Discussion at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion