code: def _discretize(a, bins, right=True):  # pragma: no cover
      """
      Discretize each row of the input array
  
      This is equivalent to `np.searchsorted(bins, a)`
  
      Parameters
      ----------
      a : numpy.ndarray
          The input array
  
      bins : numpy.ndarray
          The bin edges used to discretize `a`
  
      right : bool, default True
          Indicates whether the intervals for binning include the right or the left bin
          edge.
  
      Returns
      -------
      out : numpy.ndarray
          Discretized array
      """
      return np.digitize(a, bins, right=right)
  
file_path: stumpy/stumpy/mstump.py
imports: from functools import lru_cache, partial
  import numpy
  from numba import njit, prange
  from scipy.stats import norm
  from .None import config, core
  from .maamp import maamp, maamp_mdl, maamp_multi_distance_profile, maamp_subspace
label_desc: Use image node_id 4 for calling a global function with example usage: _discretize(a, bins, right) and returns: np