code: def counts(x, v):
      """
      Counts the number of elements of x that fall within the grid points v
  
      Notes
      -----
      Using np.digitize and np.bincount
      """
      idx = np.digitize(x, v)
      try:  # numpy 1.6
          return np.bincount(idx, minlength=len(v))
      except:
          bc = np.bincount(idx)
          return np.r_[bc, np.zeros(len(v) - len(bc))]
  
imports: import numpy
label_desc: Use image node_id 4 for calling a global function with example usage: counts(x, v) and returns: np, np