On Thu, Feb 18, 2016 at 10:19 PM, Alan Isaac <alan.isaac@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