[Numpy-discussion] proposal: new logspace without the log in the argument
Robert Kern
robert.kern at gmail.com
Thu Feb 18 17:26:08 EST 2016
On Thu, Feb 18, 2016 at 10:19 PM, Alan Isaac <alan.isaac at gmail.com> wrote:
>
> On 2/18/2016 2:44 PM, Robert Kern wrote:
>>
>> In a new function not named `linspace()`, I think that might be fine. I
do occasionally want to swap between linear and logarithmic/geometric
spacing based on a parameter, so this
>> doesn't violate the van Rossum Rule of Function Signatures.
>
> Would such a new function correct the apparent mistake (?) of
> `linspace` including the endpoint by default?
> Or is the current API justified by its Matlab origins?
> (Or have I missed the point altogether?)
The last, I'm afraid. Different use cases, different conventions. Integer
ranges are half-open because that is the most useful convention in a
0-indexed ecosystem. Floating point ranges don't interface with indexing,
and the closed intervals are the most useful (or at least the most common).
> If this query is annoying, please ignore it. It is not meant to be.
The same for my answer.
--
Robert Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20160218/a7167559/attachment.html>
More information about the NumPy-Discussion
mailing list