@@ -26,12 +26,13 @@ def fit(self, X: np.ndarray, y=None):
2626 if isinstance (self .truncation , int ):
2727 self .weights = frac_weights (self .order , self .truncation )
2828 else : # 'find' or None
29- _ , self .weights = find_truncation (self .order , tau = self .tau , mmax = self .mmax )
29+ _ , self .weights = find_truncation (
30+ self .order , tau = self .tau , mmax = self .mmax )
3031
3132 # enforce float data type
3233 if self .dtype is None :
3334 self .dtype = X [0 ].dtype if isinstance (X [0 ], float ) else float
34-
35+
3536 return self
3637
3738 def transform (self , X : np .ndarray ) -> np .ndarray :
@@ -41,8 +42,9 @@ def transform(self, X: np.ndarray) -> np.ndarray:
4142 else :
4243 Z = np .empty (shape = X .shape )
4344 for j in range (X .shape [1 ]):
44- Z [:, j ] = apply_weights (X [:, j ].astype (self .dtype ), self .weights )
45+ Z [:, j ] = apply_weights (
46+ X [:, j ].astype (self .dtype ), self .weights )
4547 return Z
46-
47- #def inverse_transform(self, Z: np.ndarray) -> np.ndarray:
48+
49+ # def inverse_transform(self, Z: np.ndarray) -> np.ndarray:
4850 # pass # return X
0 commit comments