[Numpy-discussion] List/location of consecutive integers
Mon May 25 12:57:56 CDT 2009
Andrea Gavana <andrea.gavana <at> gmail.com> writes:
> this should be a very easy question but I am trying to make a
> script run as fast as possible, so please bear with me if the solution
> is easy and I just overlooked it.
That's weird, I was trying to solve exactly the same problem a couple of weeks
ago for a program I was working on. It must come up a lot.
I ended up with a similar solution to Josef's, but it took me more than an hour
to work it out - I should have asked here first!
More information about the Numpy-discussion