[Numpy-discussion] getting indices for array positions

Christian ckkart at hoc.net
Wed Feb 7 20:03:02 EST 2007


Christian Meesters <meesters <at> uni-mainz.de> writes:

> Since searchsorted returns the index of the first item in a that is >= or > 
> the key, it can't make the distinction between 0.1 and 0.2 as I would like to 

Then how about a.searchsorted(val+0.5) 

Christian






More information about the NumPy-Discussion mailing list