docs: def apply_filter(x, filter=None, axis=0):
      """Apply a filter to an array."""
      x = _as_array(x)
      if x.shape[axis] == 0:
          return x
      b, a = filter
      return signal.filtfilt(b, a, x, axis=axis)