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

2016-02-19 Thread Joseph Fox-Rabinovitz
If the author is willing, I'd say both functions are useful. The "geom" prefix is very fitting. - Joe -- Original message--From: Robert KernDate: Fri, Feb 19, 2016 08:00To: Discussion of Numerical Python;Subject:Re: [Numpy-discussion] proposal: new logspace without the

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

2016-02-19 Thread Robert Kern
On Fri, Feb 19, 2016 at 12:10 PM, Andrew Nelson wrote: > > With respect to geomspace proposals: instead of specifying start and end values and the number of points I'd like to have an option where I can set the start and end points and the ratio. The function would then work

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

2016-02-19 Thread .
What about this API? You specify the start point, ratio, and number of points. http://spacepy.lanl.gov/doc/autosummary/spacepy.toolbox.geomspace.html On Fri, Feb 19, 2016 at 7:10 AM, Andrew Nelson andyfaff-at-gmail.com |numpy mailing list/Example Allow| wrote: >

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

2016-02-19 Thread Andrew Nelson
With respect to geomspace proposals: instead of specifying start and end values and the number of points I'd like to have an option where I can set the start and end points and the ratio. The function would then work out the correct number of points to get closest to the end value. E.g.

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

2016-02-18 Thread Peter Creasey
> > 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. > > - I guess the alternative interface might be something like > > np.linspace(start, stop, steps, spacing="log") > > what do

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

2016-02-18 Thread Chris Barker
On Thu, Feb 18, 2016 at 2:19 PM, Alan Isaac wrote: > 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? > I don't think so -- we don't need no stinkin'

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

2016-02-18 Thread Robert Kern
On Thu, Feb 18, 2016 at 10:19 PM, Alan Isaac 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,

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

2016-02-18 Thread Alan Isaac
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

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

2016-02-18 Thread Joseph Fox-Rabinovitz
I like the idea, as long as we all remain aware of the irony of having a "log" spacing for a function named "lin"space. -Joe On Thu, Feb 18, 2016 at 2:44 PM, Robert Kern wrote: > On Thu, Feb 18, 2016 at 7:38 PM, Nathaniel Smith wrote: >> >> Some

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

2016-02-18 Thread Robert Kern
On Thu, Feb 18, 2016 at 7:38 PM, Nathaniel Smith 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. > -

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

2016-02-18 Thread Nathaniel Smith
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. - I guess the alternative interface might be something like np.linspace(start, stop, steps, spacing="log") what do people think? -n

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

2016-02-17 Thread .
I've suggested a new function similar to logspace, but where you specify the start and stop points directly instead of using log(start) and base arguments: https://github.com/numpy/numpy/issues/7255 https://github.com/numpy/numpy/pull/7268 ___