On Fri, 2013-03-01 at 08:30 +0100, Nicolas Rougier wrote:
Hi,
I'm trying to increment an array using indexing and a second array for
increment values (since it might be a little tedious to explain, see below
for a short example).
Using direct indexing, the values in the example are
bincount takes a weights argument which should do exactly what you are
looking for.
Fantastic ! Thanks !
Nicolas
___
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Hi,
there has been a request on the issue tracker for a step parameter to
linspace. This is of course tricky with the imprecision of floating
point numbers.
As a trade off, I was thinking of a step parameter that is used to
calculate the integer number of steps. However to be certain that it
On Fri, 2013-03-01 at 13:25 +0100, Sebastian Berg wrote:
there has been a request on the issue tracker for a step parameter to
linspace. This is of course tricky with the imprecision of floating
point numbers.
How is that different to arange? Either you specify the number of points
with
On Fri, 2013-03-01 at 12:33 +, Henry Gomersall wrote:
On Fri, 2013-03-01 at 13:25 +0100, Sebastian Berg wrote:
there has been a request on the issue tracker for a step parameter to
linspace. This is of course tricky with the imprecision of floating
point numbers.
How is that
On Fri, Mar 1, 2013 at 12:33 PM, Henry Gomersall h...@cantab.net wrote:
On Fri, 2013-03-01 at 13:25 +0100, Sebastian Berg wrote:
there has been a request on the issue tracker for a step parameter to
linspace. This is of course tricky with the imprecision of floating
point numbers.
How is
On Fri, 2013-03-01 at 13:34 +, Nathaniel Smith wrote:
My usual hack to deal with the numerical bounds issue is to
add/subtract
half the step.
Right. Which is exactly the sort of annoying, content-free code that a
library is supposed to handle for you, so you can save mental energy
On 3/1/13, Henry Gomersall h...@cantab.net wrote:
On Fri, 2013-03-01 at 13:34 +, Nathaniel Smith wrote:
My usual hack to deal with the numerical bounds issue is to
add/subtract
half the step.
Right. Which is exactly the sort of annoying, content-free code that a
library is supposed to
On Fri, 2013-03-01 at 09:24 -0500, Warren Weckesser wrote:
In my jet-lag addled state, i can't see when this out[-1] stop
case
will occur, but I can take it as true. It does seem to be
problematic
though.
Here you go:
In [32]: end = 2.2
In [33]: x = arange(0.1, end, 0.3)
On Fri, 2013-03-01 at 13:34 +, Nathaniel Smith wrote:
On Fri, Mar 1, 2013 at 12:33 PM, Henry Gomersall h...@cantab.net wrote:
On Fri, 2013-03-01 at 13:25 +0100, Sebastian Berg wrote:
there has been a request on the issue tracker for a step parameter to
linspace. This is of course tricky
On 3/1/2013 9:32 AM, Henry Gomersall wrote:
there should be an equivalent for floats that
unambiguously returns a range for the half open interval
If I've understood you:
start + stepsize*np.arange(nsteps)
fwiw,
Alan Isaac
___
NumPy-Discussion
On Fri, 2013-03-01 at 10:01 -0500, Alan G Isaac wrote:
On 3/1/2013 9:32 AM, Henry Gomersall wrote:
there should be an equivalent for floats that
unambiguously returns a range for the half open interval
If I've understood you:
start + stepsize*np.arange(nsteps)
yes, except that nsteps
On Fri, 2013-03-01 at 15:07 +, Henry Gomersall wrote:
On Fri, 2013-03-01 at 10:01 -0500, Alan G Isaac wrote:
On 3/1/2013 9:32 AM, Henry Gomersall wrote:
there should be an equivalent for floats that
unambiguously returns a range for the half open interval
If I've understood
One motivation of this thread was that
adding a step parameter to linspace might make
things easier for beginners.
I claim this thread has put the lie to that,
starting with the initial post. So what is the
persuasive case for the change?
Imo, the current situation is good:
use arange if you
On Fri, 2013-03-01 at 10:49 -0500, Alan G Isaac wrote:
One motivation of this thread was that
adding a step parameter to linspace might make
things easier for beginners.
I claim this thread has put the lie to that,
starting with the initial post. So what is the
persuasive case for the
On Fri, 2013-03-01 at 17:29 +0100, Sebastian Berg wrote:
At this time it seems there is more sentiment against it and that is
fine with me. I thought it might be useful for some who normally want
the linspace behavior, but do not want to worry about the right num in
some cases. Someone who
16 matches
Mail list logo