class_docstr: Abstract base class for time series clusterer.
  
  Parameters
  ----------
  n_clusters: int, defaults = None
      Number of clusters for model.
class_docstr_tok: ["Abstract","base","class","for","time","series","clusterer",".","Parameters","--","--","--","--","--","n_clusters",":","int",",","defaults","=","None","Number","of","clusters","for","model","."]
docstr: Compute cluster centers and predict cluster index for each time series.
  
  Convenience method; equivalent of calling fit(X) followed by predict(X)
  
  Parameters
  ----------
  X : np.ndarray (2d or 3d array of shape (n_instances, series_length) or shape
      (n_instances, n_dimensions, series_length)) or pd.DataFrame (where each
      column is a dimension, each cell is a pd.Series (any number of dimensions,
      equal or unequal length series)).
      Time series instances to train clusterer and then have indexes each belong
      to return.
  y: ignored, exists for API consistency reasons.
  
  Returns
  -------
  np.ndarray (1d array of shape (n_instances,))
      Index of the cluster each time series in X belongs to.
docstr_tok: ["Compute","cluster","centers","and","predict","cluster","index","for","each","time","series",".","Convenience","method",";","equivalent","of","calling","fit","(","X",")","followed","by","predict","(","X",")","Parameters","--","--","--","--","--","X",":","np.ndarray","(","2d","or","3d","array","of","shape","(","n_instances",",","series_length",")","or","shape","(","n_instances",",","n_dimensions",",","series_length",")",")","or","pd.DataFrame","(","where","each","column","is","a","dimension",",","each","cell","is","a","pd.Series","(","any","number","of","dimensions",",","equal","or","unequal","length","series",")",")",".","Time","series","instances","to","train","clusterer","and","then","have","indexes","each","belong","to","return",".","y",":","ignored",",","exists","for","API","consistency","reasons",".","Returns","--","--","--","-","np.ndarray","(","1d","array","of","shape","(","n_instances",",",")",")","Index","of","the","cluster","each","time","series","in","X","belongs","to","."]
code: def fit_predict(self, X: TimeSeriesInstances, y=None) -> np.ndarray:
      """Compute cluster centers and predict cluster index for each time series.
  
      Convenience method; equivalent of calling fit(X) followed by predict(X)
  
      Parameters
      ----------
      X : np.ndarray (2d or 3d array of shape (n_instances, series_length) or shape
          (n_instances, n_dimensions, series_length)) or pd.DataFrame (where each
          column is a dimension, each cell is a pd.Series (any number of dimensions,
          equal or unequal length series)).
          Time series instances to train clusterer and then have indexes each belong
          to return.
      y: ignored, exists for API consistency reasons.
  
      Returns
      -------
      np.ndarray (1d array of shape (n_instances,))
          Index of the cluster each time series in X belongs to.
      """
      self.fit(X)
      return self.predict(X)
  
imports: import time
  from typing import Any, Union
  import numpy
  import pandas
  from sktime.base import BaseEstimator
  from sktime.datatypes import check_is_scitype, convert_to, scitype_to_mtype
  from sktime.utils.sklearn import is_sklearn_transformer
  from sktime.utils.validation import check_n_jobs
  from sktime.utils.validation._dependencies import _check_estimator_deps
label_desc: Use image node_id 5 for calling the BaseClusterer obj's underlying member method code with example usage: obj.fit_predict(X, y) and returns: self