class_docstr: Helper for resampling.
docstr: Apply the prepared filter to the specified axis of N-D signal x.
docstr_tok: ["Apply","the","prepared","filter","to","the","specified","axis","of","N-D","signal","x","."]
code: def apply_filter(self, x, axis=-1, mode="constant", cval=0):
      """Apply the prepared filter to the specified axis of N-D signal x."""
      output_len = _output_len(
          self._h_len_orig, x.shape[axis], self._up, self._down
      )
      # Explicit use of np.int64 for output_shape dtype avoids OverflowError
      # when allocating large array on platforms where np.int_ is 32 bits
      output_shape = np.asarray(x.shape, dtype=np.int64)
      output_shape[axis] = output_len
      out = np.zeros(output_shape, dtype=self._output_type, order="C")
      axis = axis % x.ndim
      mode = _check_mode(mode)
      _apply(
          np.asarray(x, self._output_type),
          self._h_trans_flip,
          out,
          self._up,
          self._down,
          axis,
          mode,
          cval,
      )
      return out
  
file_path: catboost/contrib/python/scipy/py3/scipy/signal/_upfirdn.py
imports: import numpy
  from ._upfirdn_apply import _output_len, _apply, mode_enum
label_desc: Use image node_id 2 for calling the _UpFIRDn obj's underlying member method code with example usage: obj.apply_filter(x, axis, mode, cval) and returns: out