[Numpy-discussion] getting indices for array positions

Christian ckkart@hoc....
Wed Feb 7 19:03:02 CST 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