find nearest value in numpy array

Posted by Arthur Dent on Stack Overflow See other posts from Stack Overflow or by Arthur Dent
Published on 2010-04-02T11:38:23Z Indexed on 2010/04/02 11:43 UTC
Read the original article Hit count: 184

Filed under:
|
|
|

Hi, is there a numpy-thonic way, e.g. function, to find the 'nearest value' in an array? example:

np.find_nearest( array, value )

thanks in advance!

© Stack Overflow or respective owner

Related posts about python

Related posts about numpy