code: def _multi_mass(
      Q,
      T,
      m,
      M_T,
      Σ_T,
      μ_Q,
      σ_Q,
      T_subseq_isconstant,
      Q_subseq_isconstant,
      query_idx=None,
  ):
      """
      A multi-dimensional wrapper around "Mueen's Algorithm for Similarity Search"
      (MASS) to compute multi-dimensional distance profile.
  
      Parameters
      ----------
      Q : numpy.ndarray
          Query array or subsequence
  
      T : numpy.ndarray
          Time series array or sequence
  
      m : int
          Window size
  
      M_T : numpy.ndarray
          Sliding mean for `T`
  
      Σ_T : numpy.ndarray
          Sliding standard deviation for `T`
  
      μ_Q : numpy.ndarray
          Mean value of `Q`
  
      σ_Q : numpy.ndarray
          Standard deviation of `Q`
  
      T_subseq_isconstant : numpy.ndarray
          A boolean array that indicates whether a subsequence in `T` is constant (True)
  
      Q_subseq_isconstant : numpy.ndarray
          A boolean array that indicates whether the subsequence in `Q` is constant (True)
  
      query_idx : int, default None
          This is the index position along each of the time series in `T`, where
          the query subsequence, `Q`, is located. `query_idx` should be set to None
          if `Q` is not a subsequence of `T`. If `Q` is a subsequence of `T`, provding
          this argument is optional. If query_idx is provided, the distance between Q
          and `T[:, query_idx : query_idx + m]` will automatically be set to zero.
  
      Returns
      -------
      D : numpy.ndarray
          Multi-dimensional distance profile
      """
      d, n = T.shape
      l = n - m + 1
  
      D = np.empty((d, l), dtype=np.float64)
  
      for i in range(d):
          if np.isinf(μ_Q[i]):
              D[i, :] = np.inf
          else:
              D[i, :] = core.mass(
                  Q[i],
                  T[i],
                  M_T[i],
                  Σ_T[i],
                  T_subseq_isconstant=T_subseq_isconstant[i],
                  Q_subseq_isconstant=Q_subseq_isconstant[i],
                  query_idx=query_idx,
              )
  
      return D
  
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 1 for calling a global function with example usage: _multi_mass(Q, T, m, M_T, Σ_T, μ_Q, σ_Q, T_subseq_isconstant, Q_subseq_isconstant, query_idx) and returns: D