def fit(self, X, fs: float=None, zi=None):
    '[summary]\n\n        Args:\n            X ([type]): [description]\n            fs (float, optional): [description]. Defaults to None.\n            zi ([type], optional): [description]. Defaults to None.\n\n        Returns:\n            [type]: [description]\n        '
    if (fs is not None):
        self.fs = fs
    if isinstance(self.stopband, str):
        import pickle
        import os
        if os.path.isfile(self.stopband):
            fn = self.stopband
        else:
            fn = os.path.join(os.path.dirname(os.path.abspath(__file__)), self.stopband)
        with open(fn, 'rb') as f:
            self.sos_ = pickle.load(f)
            self.zi_ = pickle.load(f)
            f.close()
        self.zi_ = sosfilt_zi_warmup(self.zi_, X, self.axis)
        print('X={} zi={}'.format(X.shape, self.zi_.shape))
    else:
        (X, self.sos_, self.zi_) = butter_sosfilt(X, self.stopband, self.fs, order=self.order, axis=self.axis, zi=zi, ftype=self.ftype)
    self.nsamp = 0
    self.resamprate_ = ((int(round(((self.fs * 2.0) / self.fs_out))) / 2.0) if (self.fs_out is not None) else 1)
    self.out_fs_ = (self.fs / self.resamprate_)
    print('resample: {}->{}hz rsrate={}'.format(self.fs, self.out_fs_, self.resamprate_))
    return self
[summary]

Args:
    X ([type]): [description]
    fs (float, optional): [description]. Defaults to None.
    zi ([type], optional): [description]. Defaults to None.

Returns:
    [type]: [description]
def fit(self, X, fs: float=None, zi=None):
    '[summary]\n\n        Args:\n            X ([type]): [description]\n            fs (float, optional): [description]. Defaults to None.\n            zi ([type], optional): [description]. Defaults to None.\n\n        Returns:\n            [type]: [description]\n        '
    if (fs is not None):
        self.fs = fs
    if isinstance(self.stopband, str):
        import pickle
        import os
        if os.path.isfile(self.stopband):
            fn = self.stopband
        else:
            fn = os.path.join(os.path.dirname(os.path.abspath(__file__)), self.stopband)
        with open(fn, 'rb') as f:
            self.sos_ = pickle.load(f)
            self.zi_ = pickle.load(f)
            f.close()
        self.zi_ = sosfilt_zi_warmup(self.zi_, X, self.axis)
        print('X={} zi={}'.format(X.shape, self.zi_.shape))
    else:
        (X, self.sos_, self.zi_) = butter_sosfilt(X, self.stopband, self.fs, order=self.order, axis=self.axis, zi=zi, ftype=self.ftype)
    self.nsamp = 0
    self.resamprate_ = ((int(round(((self.fs * 2.0) / self.fs_out))) / 2.0) if (self.fs_out is not None) else 1)
    self.out_fs_ = (self.fs / self.resamprate_)
    print('resample: {}->{}hz rsrate={}'.format(self.fs, self.out_fs_, self.resamprate_))
    return self