Skip to content

Commit eba2a1f

Browse files
committed
flak8 cmd and pip8 syntax fixed
1 parent 5e96faf commit eba2a1f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Check the [examples](http://github.com/ulf1/fracdiff/examples) folder for notebo
3535

3636

3737
## Commands
38-
* Check syntax: `flake8 --ignore=F401`
38+
* Check syntax: `flake8 --ignore=F401 --exclude=$(grep -v '^#' .gitignore | xargs | sed -e 's/ /,/g')`
3939
* Run Unit Tests: `python -W ignore -m unittest discover`
4040
* Remove `.pyc` files: `find . -type f -name "*.pyc" | xargs rm`
4141
* Remove `__pycache__` folders: `find . -type d -name "__pycache__" | xargs rm -rf`

fracdiff/fracdiff_class.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)