[ncl-talk] numpy.digitize equivalent NCL function?

Joe Lee hyoklee at hdfgroup.org
Fri Jun 15 19:13:29 MDT 2018


Hi,

 I'm looking for NCL function that is equivalent to [1].
 
Here's the description of "numpy.digitize()":

"Return the indices of the bins to which each value in input array belongs.
  Each index i returned is such that bins[i-1] <= x < bins[i] if bins is monotonically increasing, or bins[i-1] > x >= bins[i] if bins is monotonically decreasing. If values in x are beyond the bounds of bins, 0 or len(bins) is    returned as appropriate. If right is True, then the right bin is closed so that the index i is such that bins[i-1] < x <= bins[i] or bins[i-1] >= x > bins[i]`` if bins is monotonically increasing or decreasing, respectively."

 If not, how can I write a similar function in NCL?
 
 Sincerely,

[1] https://docs.scipy.org/doc/numpy-1.12.0/reference/generated/numpy.digitize.html


More information about the ncl-talk mailing list