class_docstr: Compute an approximate z-normalized matrix profile
  
  This is a convenience wrapper around the Numba JIT-compiled parallelized
  `_stump` function which computes the matrix profile according to SCRIMP.
  
  Parameters
  ----------
  T_A : numpy.ndarray
      The time series or sequence for which to compute the matrix profile
  
  T_B : numpy.ndarray
      The time series or sequence that will be used to annotate T_A. For every
      subsequence in T_A, its nearest neighbor in T_B will be recorded.
  
  m : int
      Window size
  
  ignore_trivial : bool
      Set to `True` if this is a self-join. Otherwise, for AB-join, set this to
      `False`. Default is `True`.
  
  percentage : float
      Approximate percentage completed. The value is between 0.0 and 1.0.
  
  pre_scrump : bool
      A flag for whether or not to perform the PreSCRIMP calculation prior to
      computing SCRIMP. If set to `True`, this is equivalent to computing
      SCRIMP++ and may lead to faster convergence
  
  s : int
      The size of the PreSCRIMP fixed interval. If `pre_scrump=True` and `s=None`,
      then `s` will automatically be set to
      `s=int(np.ceil(m / config.STUMPY_EXCL_ZONE_DENOM))`, the size of the exclusion
      zone.
  
  normalize : bool, default True
      When set to `True`, this z-normalizes subsequences prior to computing distances.
      Otherwise, this class gets re-routed to its complementary non-normalized
      equivalent set in the `@core.non_normalized` class decorator.
  
  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. This parameter is ignored when
      `normalize == True`.
  
  k : int, default 1
      The number of top `k` smallest distances used to construct the matrix profile.
      Note that this will increase the total computational time and memory usage
      when k > 1.
  
  T_A_subseq_isconstant : numpy.ndarray or function, default None
      A boolean array that indicates whether a subsequence in `T_A` is constant
      (True). Alternatively, a custom, user-defined function that returns a
      boolean array that indicates whether a subsequence in `T_A` is constant
      (True). The function must only take two arguments, `a`, a 1-D array,
      and `w`, the window size, while additional arguments may be specified
      by currying the user-defined function using `functools.partial`. Any
      subsequence with at least one np.nan/np.inf will automatically have its
      corresponding value set to False in this boolean array.
  
  T_B_subseq_isconstant : numpy.ndarray or function, default None
      A boolean array that indicates whether a subsequence in `T_B` is constant
      (True). Alternatively, a custom, user-defined function that returns a
      boolean array that indicates whether a subsequence in `T_B` is constant
      (True). The function must only take two arguments, `a`, a 1-D array,
      and `w`, the window size, while additional arguments may be specified
      by currying the user-defined function using `functools.partial`. Any
      subsequence with at least one np.nan/np.inf will automatically have its
      corresponding value set to False in this boolean array.
  
  Attributes
  ----------
  P_ : numpy.ndarray
      The updated (top-k) matrix profile. When `k=1` (default), this output is
      a 1D array consisting of the matrix profile. When `k > 1`, the output
      is a 2D array that has exactly `k` columns consisting of the top-k matrix
      profile.
  
  I_ : numpy.ndarray
      The updated (top-k) matrix profile indices. When `k=1` (default), this output is
      a 1D array consisting of the matrix profile indices. When `k > 1`, the output
      is a 2D array that has exactly `k` columns consisting of the top-k matrix
      profile indiecs.
  
  left_I_ : numpy.ndarray
      The updated left (top-1) matrix profile indices
  
  right_I_ : numpy.ndarray
      The updated right (top-1) matrix profile indices
  
  
  Methods
  -------
  update()
      Update the matrix profile and the matrix profile indices by computing
      additional new distances (limited by `percentage`) that make up the full
      distance matrix. It updates the (top-k) matrix profile, (top-1) left
      matrix profile, (top-1) right matrix profile, (top-k) matrix profile indices,
      (top-1) left matrix profile indices, and (top-1) right matrix profile indices.
  
  See Also
  --------
  stumpy.stump : Compute the z-normalized matrix profile
  stumpy.stumped : Compute the z-normalized matrix profile with a distributed dask
      cluster
  stumpy.gpu_stump : Compute the z-normalized matrix profile with one or more GPU
      devices
  
  Notes
  -----
  `DOI: 10.1109/ICDM.2018.00099     <https://www.cs.ucr.edu/~eamonn/SCRIMP_ICDM_camera_ready_updated.pdf>`__
  
  See Algorithm 1 and Algorithm 2
  
  Examples
  --------
  >>> import stumpy
  >>> import numpy as np
  >>> approx_mp = stumpy.scrump(
  ...     np.array([584., -11., 23., 79., 1001., 0., -19.]),
  ...     m=3)
  >>> approx_mp.update()
  >>> approx_mp.P_
  array([2.982409  , 3.28412702,        inf, 2.982409  , 3.28412702])
  >>> approx_mp.I_
  array([ 3,  4, -1,  0,  1])
class_docstr_tok: ["Compute","an","approximate","z-normalized","matrix","profile","This","is","a","convenience","wrapper","around","the","Numba","JIT-compiled","parallelized","`","_stump","`","function","which","computes","the","matrix","profile","according","to","SCRIMP",".","Parameters","--","--","--","--","--","T_A",":","numpy.ndarray","The","time","series","or","sequence","for","which","to","compute","the","matrix","profile","T_B",":","numpy.ndarray","The","time","series","or","sequence","that","will","be","used","to","annotate","T_A",".","For","every","subsequence","in","T_A",",","its","nearest","neighbor","in","T_B","will","be","recorded",".","m",":","int","Window","size","ignore_trivial",":","bool","Set","to","`","True","`","if","this","is","a","self-join",".","Otherwise",",","for","AB-join",",","set","this","to","`","False","`",".","Default","is","`","True","`",".","percentage",":","float","Approximate","percentage","completed",".","The","value","is","between","0.0","and","1.0.","pre_scrump",":","bool","A","flag","for","whether","or","not","to","perform","the","PreSCRIMP","calculation","prior","to","computing","SCRIMP",".","If","set","to","`","True","`",",","this","is","equivalent","to","computing","SCRIMP++","and","may","lead","to","faster","convergence","s",":","int","The","size","of","the","PreSCRIMP","fixed","interval",".","If","`","pre_scrump=True","`","and","`","s=None","`",",","then","`","s","`","will","automatically","be","set","to","`","s=int","(","np.ceil","(","m","\/","config.STUMPY_EXCL_ZONE_DENOM",")",")","`",",","the","size","of","the","exclusion","zone",".","normalize",":","bool",",","default","True","When","set","to","`","True","`",",","this","z-normalizes","subsequences","prior","to","computing","distances",".","Otherwise",",","this","class","gets","re-routed","to","its","complementary","non-normalized","equivalent","set","in","the","`","@","core.non_normalized","`","class","decorator",".","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",".","This","parameter","is","ignored","when","`","normalize","==","True","`",".","k",":","int",",","default","1","The","number","of","top","`","k","`","smallest","distances","used","to","construct","the","matrix","profile",".","Note","that","this","will","increase","the","total","computational","time","and","memory","usage","when","k",">","1",".","T_A_subseq_isconstant",":","numpy.ndarray","or","function",",","default","None","A","boolean","array","that","indicates","whether","a","subsequence","in","`","T_A","`","is","constant","(","True",")",".","Alternatively",",","a","custom",",","user-defined","function","that","returns","a","boolean","array","that","indicates","whether","a","subsequence","in","`","T_A","`","is","constant","(","True",")",".","The","function","must","only","take","two","arguments",",","`","a","`",",","a","1-D","array",",","and","`","w","`",",","the","window","size",",","while","additional","arguments","may","be","specified","by","currying","the","user-defined","function","using","`","functools.partial","`",".","Any","subsequence","with","at","least","one","np.nan\/np.inf","will","automatically","have","its","corresponding","value","set","to","False","in","this","boolean","array",".","T_B_subseq_isconstant",":","numpy.ndarray","or","function",",","default","None","A","boolean","array","that","indicates","whether","a","subsequence","in","`","T_B","`","is","constant","(","True",")",".","Alternatively",",","a","custom",",","user-defined","function","that","returns","a","boolean","array","that","indicates","whether","a","subsequence","in","`","T_B","`","is","constant","(","True",")",".","The","function","must","only","take","two","arguments",",","`","a","`",",","a","1-D","array",",","and","`","w","`",",","the","window","size",",","while","additional","arguments","may","be","specified","by","currying","the","user-defined","function","using","`","functools.partial","`",".","Any","subsequence","with","at","least","one","np.nan\/np.inf","will","automatically","have","its","corresponding","value","set","to","False","in","this","boolean","array",".","Attributes","--","--","--","--","--","P_",":","numpy.ndarray","The","updated","(","top-k",")","matrix","profile",".","When","`","k=1","`","(","default",")",",","this","output","is","a","1D","array","consisting","of","the","matrix","profile",".","When","`","k",">","1","`",",","the","output","is","a","2D","array","that","has","exactly","`","k","`","columns","consisting","of","the","top-k","matrix","profile",".","I_",":","numpy.ndarray","The","updated","(","top-k",")","matrix","profile","indices",".","When","`","k=1","`","(","default",")",",","this","output","is","a","1D","array","consisting","of","the","matrix","profile","indices",".","When","`","k",">","1","`",",","the","output","is","a","2D","array","that","has","exactly","`","k","`","columns","consisting","of","the","top-k","matrix","profile","indiecs",".","left_I_",":","numpy.ndarray","The","updated","left","(","top-1",")","matrix","profile","indices","right_I_",":","numpy.ndarray","The","updated","right","(","top-1",")","matrix","profile","indices","Methods","--","--","--","-","update","(",")","Update","the","matrix","profile","and","the","matrix","profile","indices","by","computing","additional","new","distances","(","limited","by","`","percentage","`",")","that","make","up","the","full","distance","matrix",".","It","updates","the","(","top-k",")","matrix","profile",",","(","top-1",")","left","matrix","profile",",","(","top-1",")","right","matrix","profile",",","(","top-k",")","matrix","profile","indices",",","(","top-1",")","left","matrix","profile","indices",",","and","(","top-1",")","right","matrix","profile","indices",".","See","Also","--","--","--","--","stumpy.stump",":","Compute","the","z-normalized","matrix","profile","stumpy.stumped",":","Compute","the","z-normalized","matrix","profile","with","a","distributed","dask","cluster","stumpy.gpu_stump",":","Compute","the","z-normalized","matrix","profile","with","one","or","more","GPU","devices","Notes","--","--","-","`","DOI",":","10.1109\/ICDM.2018.00099","<","https",":","\/\/www.cs.ucr.edu\/~eamonn\/SCRIMP_ICDM_camera_ready_updated.pdf",">","`","__","See","Algorithm","1","and","Algorithm","2","Examples","--","--","--","--",">",">",">","import","stumpy",">",">",">","import","numpy","as","np",">",">",">","approx_mp","=","stumpy.scrump","(","...","np.array","(","[","584.",",","-11.",",","23.",",","79.",",","1001.",",","0.",",","-19",".","]",")",",","...","m=3",")",">",">",">","approx_mp.update","(",")",">",">",">","approx_mp.P_","array","(","[","2.982409",",","3.28412702",",","inf",",","2.982409",",","3.28412702","]",")",">",">",">","approx_mp.I_","array","(","[","3",",","4",",","-1",",","0",",","1","]",")"]
docstr: Get the updated (top-k) matrix profile indices. When `k=1` (default), this
  output is a 1D array consisting of the updated matrix profile indices. When
  `k > 1`, the output is a 2D array that has exactly `k` columns consisting
  of the updated top-k matrix profile indices.
  
  Parameters
  ----------
  None
  
  Returns
  -------
  None
docstr_tok: ["Get","the","updated","(","top-k",")","matrix","profile","indices",".","When","`","k=1","`","(","default",")",",","this","output","is","a","1D","array","consisting","of","the","updated","matrix","profile","indices",".","When","`","k",">","1","`",",","the","output","is","a","2D","array","that","has","exactly","`","k","`","columns","consisting","of","the","updated","top-k","matrix","profile","indices",".","Parameters","--","--","--","--","--","None","Returns","--","--","--","-","None"]
code: def I_(self):
      """
      Get the updated (top-k) matrix profile indices. When `k=1` (default), this
      output is a 1D array consisting of the updated matrix profile indices. When
      `k > 1`, the output is a 2D array that has exactly `k` columns consisting
      of the updated top-k matrix profile indices.
  
      Parameters
      ----------
      None
  
      Returns
      -------
      None
      """
      if self._k == 1:
          return self._I.flatten().astype(np.int64)
      else:
          return self._I.astype(np.int64)
  
file_path: stumpy/stumpy/scrump.py
imports: import numba
  import numpy
  from numba import njit, prange
  from .None import config, core
  from .scraamp import prescraamp, scraamp
  from .stump import _stump
label_desc: Use image node_id 4 for calling the scrump obj's underlying member method code with example usage: obj.I_() and returns: self, self