mardi 2 décembre 2014

numpy.searchsorted for an array containing numpy.nan


Vote count:

0




I would like:


index = numpy.searchsorted(array([ 1., 2., 3., nan, 4., 5.]), 4.2, side='left')


to give me:


index = 4


this works up to the value 3.9, but not after the nan in the array. Any ideas? Thanks



asked 48 secs ago







numpy.searchsorted for an array containing numpy.nan

Aucun commentaire:

Enregistrer un commentaire