class_docstr: Scaler for time series. Scales time series so that their mean (resp.
  standard deviation) in each dimension is
  mu (resp. std).
  
  Parameters
  ----------
  mu : float (default: 0.)
      Mean of the output time series.
  std : float (default: 1.)
      Standard deviation of the output time series.
  
  Notes
  -----
      This method requires a dataset of equal-sized time series.
  
      NaNs within a time series are ignored when calculating mu and std.
  
  Examples
  --------
  >>> TimeSeriesScalerMeanVariance(mu=0.,
  ...                              std=1.).fit_transform([[0, 3, 6]])
  array([[[-1.22474487],
          [ 0.        ],
          [ 1.22474487]]])
  >>> TimeSeriesScalerMeanVariance(mu=0.,
  ...                              std=1.).fit_transform([[numpy.nan, 3, 6]])
  array([[[nan],
          [-1.],
          [ 1.]]])
class_docstr_tok: ["Scaler","for","time","series",".","Scales","time","series","so","that","their","mean","(","resp",".","standard","deviation",")","in","each","dimension","is","mu","(","resp",".","std",")",".","Parameters","--","--","--","--","--","mu",":","float","(","default",":","0",".",")","Mean","of","the","output","time","series",".","std",":","float","(","default",":","1",".",")","Standard","deviation","of","the","output","time","series",".","Notes","--","--","-","This","method","requires","a","dataset","of","equal-sized","time","series",".","NaNs","within","a","time","series","are","ignored","when","calculating","mu","and","std",".","Examples","--","--","--","--",">",">",">","TimeSeriesScalerMeanVariance","(","mu=0.",",","...","std=1",".",")",".fit_transform","(","[","[","0",",","3",",","6","]","]",")","array","(","[","[","[","-1.22474487","]",",","[","0",".","]",",","[","1.22474487","]","]","]",")",">",">",">","TimeSeriesScalerMeanVariance","(","mu=0.",",","...","std=1",".",")",".fit_transform","(","[","[","numpy.nan",",","3",",","6","]","]",")","array","(","[","[","[","nan","]",",","[","-1",".","]",",","[","1",".","]","]","]",")"]
docstr: Fit to data, then transform it.
  
  Parameters
  ----------
  X : array-like of shape (n_ts, sz, d)
      Time series dataset to be rescaled
  
  Returns
  -------
  numpy.ndarray
      Rescaled time series dataset
docstr_tok: ["Fit","to","data",",","then","transform","it",".","Parameters","--","--","--","--","--","X",":","array-like","of","shape","(","n_ts",",","sz",",","d",")","Time","series","dataset","to","be","rescaled","Returns","--","--","--","-","numpy.ndarray","Rescaled","time","series","dataset"]
code: def transform(self, X, y=None, **kwargs):
      """Fit to data, then transform it.
  
      Parameters
      ----------
      X : array-like of shape (n_ts, sz, d)
          Time series dataset to be rescaled
  
      Returns
      -------
      numpy.ndarray
          Rescaled time series dataset
      """
      check_is_fitted(self, "_X_fit_dims")
      X = check_array(X, allow_nd=True, force_all_finite=False)
      X_ = to_time_series_dataset(X)
      X_ = check_dims(X_, X_fit_dims=self._X_fit_dims, extend=False)
      mean_t = numpy.nanmean(X_, axis=1, keepdims=True)
      std_t = numpy.nanstd(X_, axis=1, keepdims=True)
      std_t[std_t == 0.0] = 1.0
  
      X_ = (X_ - mean_t) * self.std / std_t + self.mu
  
      return X_
  
imports: import numpy
  from sklearn.base import TransformerMixin
  from sklearn.utils import check_array
  from sklearn.utils.validation import check_is_fitted
  from scipy.interpolate import interp1d
  import warnings
  from tslearn.utils import to_time_series_dataset, check_equal_size, ts_size, check_dims
  from tslearn.bases import TimeSeriesBaseEstimator
label_desc: Use image node_id 4 for calling the TimeSeriesScalerMeanVariance obj's underlying member method code with example usage: obj.transform(X, y) and returns: X_