diff --git a/xrft/tests/test_utils.py b/xrft/tests/test_utils.py index 5767876..8485338 100644 --- a/xrft/tests/test_utils.py +++ b/xrft/tests/test_utils.py @@ -1,6 +1,7 @@ """ Test utility functions of xrft """ + import pytest import numpy as np import pandas as pd diff --git a/xrft/utils.py b/xrft/utils.py index c53b310..d47368d 100644 --- a/xrft/utils.py +++ b/xrft/utils.py @@ -1,6 +1,7 @@ """ Utility functions for xrft """ + import numpy as np from .xrft import _diff_coord diff --git a/xrft/xrft.py b/xrft/xrft.py index cec4740..fc498f1 100644 --- a/xrft/xrft.py +++ b/xrft/xrft.py @@ -209,7 +209,7 @@ def _diff_coord(coord): return np.diff(coord) elif pd.api.types.is_datetime64_dtype(v0): diff = np.diff(coord).astype("timedelta64[ns]").astype("f8") - diff = (diff/1e9) #convert back to seconds + diff = diff / 1e9 # convert back to seconds return diff else: return np.diff(coord)