class_docstr: Transformer that filters Series data.
  
  FIR, IIR, band pass filters.
  
  Provides a simple wrapper around ``mne.filter.filter_data``.
  
  Parameters
  ----------
  sfreq: int or float
      sampling frequency of the recorded data in Hz
  l_freq: float or None
      For FIR filters, the lower pass-band edge;
      for IIR filters, the lower cutoff frequency.
      If None the data are only low-passed.
  h_freq: float or None
      For FIR filters, the upper pass-band edge;
      for IIR filters, the upper cutoff frequency.
      If None the data are only high-passed.
  filter_kwargs: dict or None
      Additional parameters passed on to ``mne.filter.filter_data``.
      See ``mne.filter.filter_data``
      documentation for a detailed description of all options.
docstr: Transform data.
  
  Returns a transformed version of X.
  
  Parameters
  ----------
  X : 2D or 3D numpy array, sktime format np.darray or numpy3D
  y : not used, passed only for interface conformance
  
  Returns
  -------
  Xt : 2D or 3D numpy array, same dimension as X
      Transformed time series.
docstr_tok: ["Transform","data",".","Returns","a","transformed","version","of","X.","Parameters","--","--","--","--","--","X",":","2D","or","3D","numpy","array",",","sktime","format","np.darray","or","numpy3D","y",":","not","used",",","passed","only","for","interface","conformance","Returns","--","--","--","-","Xt",":","2D","or","3D","numpy","array",",","same","dimension","as","X","Transformed","time","series","."]
code: def _transform(self, X, y=None) -> np.ndarray:
      """Transform data.
  
      Returns a transformed version of X.
  
      Parameters
      ----------
      X : 2D or 3D numpy array, sktime format np.darray or numpy3D
      y : not used, passed only for interface conformance
  
      Returns
      -------
      Xt : 2D or 3D numpy array, same dimension as X
          Transformed time series.
      """
      from mne import filter
  
      # np.darray needs to be [anything, ..., time]
      # so 3D is ok, but we need to flip in 2D case
      if X.ndim == 2:
          X = X.transpose()
  
      sfreq = self.sfreq
      l_freq = self.l_freq
      h_freq = self.h_freq
  
      kwargs = self.filter_kwargs
      if kwargs is None:
          kwargs = {}
  
      # X is now of shape channels * timepoints or instance * channels * timepoints
      Xt = filter.filter_data(
          X, sfreq=sfreq, l_freq=l_freq, h_freq=h_freq, **kwargs
      )
  
      # Series, 2D: transpose back to have sktime shape again (timepoints*channels)
      if X.ndim == 2:
          Xt = Xt.transpose()
      # Panel, 3D: Xt comes out as 2D from filter_data and needs to be reshaped
      else:
          Xt = Xt.reshape(X.shape)
      return Xt
  
imports: import numpy
  from sktime.transformations.base import BaseTransformer
label_desc: Use image node_id 2 for calling the Filter obj's underlying member method code with example usage: obj._transform(X, y) and returns: Xt