code: def maamp(T, m, include=None, discords=False, p=2.0):
      """
      Compute the multi-dimensional non-normalized (i.e., without z-normalization) matrix
      profile
  
      This is a convenience wrapper around the Numba JIT-compiled parallelized
      `_maamp` function which computes the multi-dimensional matrix profile and
      multi-dimensional matrix profile index according to mSTOMP, a variant of
      mSTAMP. Note that only self-joins are supported.
  
      Parameters
      ----------
      T : numpy.ndarray
          The time series or sequence for which to compute the multi-dimensional
          matrix profile. Each row in `T` represents data from a different
          dimension while each column in `T` represents data from the same
          dimension.
  
      m : int
          Window size
  
      include : list, numpy.ndarray, default None
          A list of (zero-based) indices corresponding to the dimensions in `T` that
          must be included in the constrained multidimensional motif search.
          For more information, see Section IV D in:
  
          `DOI: 10.1109/ICDM.2017.66 \
          <https://www.cs.ucr.edu/~eamonn/Motif_Discovery_ICDM.pdf>`__
  
      discords : bool, default False
          When set to `True`, this reverses the distance matrix which results in a
          multi-dimensional matrix profile that favors larger matrix profile values
          (i.e., discords) rather than smaller values (i.e., motifs). Note that indices
          in `include` are still maintained and respected.
  
      p : float, default 2.0
          The p-norm to apply for computing the Minkowski distance. Minkowski distance is
          typically used with `p` being 1 or 2, which correspond to the Manhattan distance
          and the Euclidean distance, respectively.
  
      Returns
      -------
      P : numpy.ndarray
          The multi-dimensional matrix profile. Each row of the array corresponds
          to each matrix profile for a given dimension (i.e., the first row is
          the 1-D matrix profile and the second row is the 2-D matrix profile).
  
      I : numpy.ndarray
          The multi-dimensional matrix profile index where each row of the array
          corresponds to each matrix profile index for a given dimension.
  
      Notes
      -----
      `DOI: 10.1109/ICDM.2017.66 \
      <https://www.cs.ucr.edu/~eamonn/Motif_Discovery_ICDM.pdf>`__
  
      See mSTAMP Algorithm
      """
      T_A = T
      T_B = T_A
  
      T_A, T_A_subseq_isfinite = core.preprocess_non_normalized(T_A, m)
      T_B, T_B_subseq_isfinite = core.preprocess_non_normalized(T_B, m)
  
      if T_A.ndim <= 1:  # pragma: no cover
          err = f"T is {T_A.ndim}-dimensional and must be at least 1-dimensional"
          raise ValueError(f"{err}")
  
      core.check_window_size(
          m, max_size=min(T_A.shape[1], T_B.shape[1])
      )
  
      if include is not None:
          include = core._preprocess_include(include)
  
      d, n = T_B.shape
      l = n - m + 1
      excl_zone = int(
          np.ceil(m / config.STUMPY_EXCL_ZONE_DENOM)
      )  # See Definition 3 and Figure 3
  
      P = np.empty((d, l), dtype=np.float64)
      I = np.empty((d, l), dtype=np.int64)
  
      start = 0
      stop = l
  
      P[:, start], I[:, start] = _get_first_maamp_profile(
          start,
          T_A,
          T_B,
          m,
          excl_zone,
          T_B_subseq_isfinite,
          p,
          include,
          discords,
      )
  
      p_norm, p_norm_first = _get_multi_p_norm(start, T_A, m, p=p)
  
      P[:, start + 1 : stop], I[:, start + 1 : stop] = _maamp(
          T_A,
          m,
          stop,
          excl_zone,
          T_A_subseq_isfinite,
          T_B_subseq_isfinite,
          p,
          p_norm,
          p_norm_first,
          l,
          start + 1,
          include,
          discords,
      )
  
      return P, I
  
file_path: stumpy/stumpy/maamp.py
imports: from functools import partial
  import numpy
  from numba import njit, prange
  from .None import config, core
label_desc: Use image node_id 11 for calling a global function with example usage: maamp(T, m, include, discords, p) and returns: P,  I