class_docstr: Dynamic Time Warping (DTW) Alignment.
  
  Attributes
  ----------
  n
      The length of `series1`
  m
      The length of `series2`
  series1
      A `TimeSeries` to align with `series2`.
  series2
      A `TimeSeries` to align with `series1`.
  cost
      The `CostMatrix` for DTW.
class_docstr_tok: ["Dynamic","Time","Warping","(","DTW",")","Alignment",".","Attributes","--","--","--","--","--","n","The","length","of","`","series1","`","m","The","length","of","`","series2","`","series1","A","`","TimeSeries","`","to","align","with","`","series2","`",".","series2","A","`","TimeSeries","`","to","align","with","`","series1","`",".","cost","The","`","CostMatrix","`","for","DTW","."]
docstr: Gives the index paths from `series1` to `series2`.
  
  Returns
  -------
  np.ndarray of shape `(len(path), 2)`
      An array of indices [[i0,j0], [i1,j1], [i2,j2], ...], where i indexes into series1
      and j indexes into series2.
      Indices are in monotonic order, path[n] >= path[n-1]
docstr_tok: ["Gives","the","index","paths","from","`","series1","`","to","`","series2","`",".","Returns","--","--","--","-","np.ndarray","of","shape","`","(","len","(","path",")",",","2",")","`","An","array","of","indices","[","[","i0",",","j0","]",",","[","i1",",","j1","]",",","[","i2",",","j2","]",",","...","]",",","where","i","indexes","into","series1","and","j","indexes","into","series2",".","Indices","are","in","monotonic","order",",","path","[","n","]",">","=","path","[","n-1","]"]
code: def path(self) -> np.ndarray:
      """Gives the index paths from `series1` to `series2`.
  
      Returns
      -------
      np.ndarray of shape `(len(path), 2)`
          An array of indices [[i0,j0], [i1,j1], [i2,j2], ...], where i indexes into series1
          and j indexes into series2.
          Indices are in monotonic order, path[n] >= path[n-1]
      """
  
      if hasattr(self, "_path"):
          return self._path
      self._path = _dtw_path(self.cost)
      return self._path
  
imports: import copy
  from typing import Callable, Optional, Union
  import numpy
  import pandas
  import xarray
  from darts import TimeSeries
  from darts.logging import get_logger, raise_if, raise_if_not
  from darts.timeseries import DIMS
  from .cost_matrix import CostMatrix
  from .window import CRWindow, NoWindow, Window
label_desc: Use image node_id 2 for calling the DTWAlignment obj's underlying member method code with example usage: obj.path() and returns: self, self