[SciPy-User] Replace duplicates in a monotonically increasing array with linearly interpolated values.

Vincent Schut schut@sarvision...
Wed Sep 15 04:20:20 CDT 2010


Ah, mine has, but I'm using the development version (from the svn 
repository) of both. See 
http://docs.scipy.org/doc/numpy/reference/generated/numpy.unique.html.
Hmm, according to the docs version 1.5 of numpy should have it already 
(http://docs.scipy.org/doc/numpy-1.5.x/reference/generated/numpy.unique.html), 
so you might just try to upgrade your numpy.

Vincent.

On 09/14/2010 09:03 PM, Dharhas Pothina wrote:
> Vincent,
>
>> Hmm, something like this should do the trick (not tested):
>> xUnique, xUniqueIndices = scipy.unique(x, return_index=True)
>
> Neither numpy.unique or scipy.unique seem to have a return_index keyword arg.
>
> - dharhas



More information about the SciPy-User mailing list