class_docstr: Abstract class to define a numba compatible distance metric.
class_docstr_tok: ["Abstract","class","to","define","a","numba","compatible","distance","metric","."]
docstr: Ensure the time series are correct format.
  
  Parameters
  ----------
  x: np.ndarray (2d array)
      A time series to check.
  
  Raises
  ------
  ValueError
      If x is not a numpy array.
      If x has less than or greater than 2 dimensions.
docstr_tok: ["Ensure","the","time","series","are","correct","format",".","Parameters","--","--","--","--","--","x",":","np.ndarray","(","2d","array",")","A","time","series","to","check",".","Raises","--","--","--","ValueError","If","x","is","not","a","numpy","array",".","If","x","has","less","than","or","greater","than","2","dimensions","."]
code: def _validate_factory_timeseries(x: np.ndarray) -> None:
      """Ensure the time series are correct format.
  
      Parameters
      ----------
      x: np.ndarray (2d array)
          A time series to check.
  
      Raises
      ------
      ValueError
          If x is not a numpy array.
          If x has less than or greater than 2 dimensions.
      """
      if not isinstance(x, np.ndarray):
          raise ValueError(
              f"The array {x} is not a numpy array. Please ensure it"
              f"is a 2d numpy and try again."
          )
  
      if x.ndim != 2:
          raise ValueError(
              f"The array {x} has the incorrect number of dimensions."
              f"Ensure the array has exactly 2 dimensions and try "
              f"again."
          )
  
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 5 for calling the NumbaDistance obj's underlying member method code with example usage: obj._validate_factory_timeseries(x) without return types