[Numpy-discussion] proposal: new logspace without the log in the argument

Robert Kern robert.kern at gmail.com
Thu Feb 18 14:44:08 EST 2016


On Thu, Feb 18, 2016 at 7:38 PM, Nathaniel Smith <njs at pobox.com> wrote:
>
> Some questions it'd be good to get feedback on:
>
> - any better ideas for naming it than "geomspace"? It's really too bad
> that the 'logspace' name is already taken.

geomspace() is a perfectly cromulent name, IMO.

> - I guess the alternative interface might be something like
>
> np.linspace(start, stop, steps, spacing="log")
>
> what do people think?

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.

--
Robert Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20160218/8970cd39/attachment.html>


More information about the NumPy-Discussion mailing list