[Numpy-discussion] logspace behaviour/documentation
Arnd Baecker
arnd.baecker at web.de
Mon Jul 10 00:59:14 CDT 2006
Hi Alan,
sorry, for answering so late - your message slipped through ...
On Fri, 30 Jun 2006, Alan Isaac wrote:
> On Fri, 30 Jun 2006, T) Arnd Baecker wrote:
> > I am wondering a bit about the the behaviour of logspace:
>
> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/logspace.html
>
> fwiw,
Alright, if one wants to keep compatibility with matlab, the behaviour
of logspace should be unchanged.
I'd suggest that something along
def logspace(start,stop,num=50,endpoint=True,base=10.0):
"""Evenly spaced numbers on a logarithmic scale.
Return 'int(num)' evenly spaced samples on a logarithmic scale from
'base'**'start' to 'base'**'stop'. If 'endpoint' is True, the
last sample is 'base'**'stop'."""
is clearer than the present one
Docstring:
Evenly spaced numbers on a logarithmic scale.
Computes int(num) evenly spaced exponents from start to stop.
If endpoint=True, then last exponent is stop.
Returns base**exponents.
(Note that I am not a native speaker - surprise - ;
so maybe the present one is already clear enough?)
Best, Arnd
More information about the Numpy-discussion
mailing list