class_docstr: Abstract class to define a numba compatible distance metric.
class_docstr_tok: ["Abstract","class","to","define","a","numba","compatible","distance","metric","."]
docstr: Abstract method to create a no_python compiled distance path computation.
  
  _distance_factory should validate kwargs and then compile a no_python callable
  that takes (x, y) as parameters and returns a float that represents the distance
  between the two time series.
  
  Parameters
  ----------
  x: np.ndarray (2d array)
      First time series
  y: np.ndarray (2d array)
      Second time series
  return_cost_matrix: bool, defaults = False
      Boolean that when true will also return the cost matrix.
  kwargs: kwargs
      kwargs for the given distance metric
  
  Returns
  -------
  Callable[[np.ndarray, np.ndarray], Union[np.ndarray, float]]
      Callable where two, numpy 2d arrays are taken as parameters (x and y),
      a np.ndarray of tuples containing the optimal path and a float is also
       returned that represents the distance between x and y.
      This callable will be no_python compiled.
docstr_tok: ["Abstract","method","to","create","a","no_python","compiled","distance","path","computation",".","_distance_factory","should","validate","kwargs","and","then","compile","a","no_python","callable","that","takes","(","x",",","y",")","as","parameters","and","returns","a","float","that","represents","the","distance","between","the","two","time","series",".","Parameters","--","--","--","--","--","x",":","np.ndarray","(","2d","array",")","First","time","series","y",":","np.ndarray","(","2d","array",")","Second","time","series","return_cost_matrix",":","bool",",","defaults","=","False","Boolean","that","when","true","will","also","return","the","cost","matrix",".","kwargs",":","kwargs","kwargs","for","the","given","distance","metric","Returns","--","--","--","-","Callable","[","[","np.ndarray",",","np.ndarray","]",",","Union","[","np.ndarray",",","float","]","]","Callable","where","two",",","numpy","2d","arrays","are","taken","as","parameters","(","x","and","y",")",",","a","np.ndarray","of","tuples","containing","the","optimal","path","and","a","float","is","also","returned","that","represents","the","distance","between","x","and","y",".","This","callable","will","be","no_python","compiled","."]
code: def _distance_alignment_path_factory(
      self,
      x: np.ndarray,
      y: np.ndarray,
      return_cost_matrix: bool = False,
      **kwargs: dict,
  ) -> DistanceAlignmentPathCallable:
      """Abstract method to create a no_python compiled distance path computation.
  
      _distance_factory should validate kwargs and then compile a no_python callable
      that takes (x, y) as parameters and returns a float that represents the distance
      between the two time series.
  
      Parameters
      ----------
      x: np.ndarray (2d array)
          First time series
      y: np.ndarray (2d array)
          Second time series
      return_cost_matrix: bool, defaults = False
          Boolean that when true will also return the cost matrix.
      kwargs: kwargs
          kwargs for the given distance metric
  
      Returns
      -------
      Callable[[np.ndarray, np.ndarray], Union[np.ndarray, float]]
          Callable where two, numpy 2d arrays are taken as parameters (x and y),
          a np.ndarray of tuples containing the optimal path and a float is also
           returned that represents the distance between x and y.
          This callable will be no_python compiled.
      """
      raise NotImplementedError(
          "This distance does not support a path."
      )
  
file_path: sktime/sktime/distances/base/_base.py
imports: from abc import ABC, abstractmethod
  from typing import Callable, NamedTuple, Set
  import numpy
  from sktime.distances.base._types import AlignmentPathReturn, DistanceAlignmentPathCallable, DistanceCallable
label_desc: Use image node_id 7 for calling the NumbaDistance obj's underlying member method code with example usage: obj._distance_alignment_path_factory(x, y, return_cost_matrix) without return types