Skip to content

Commit

Permalink
run black
Browse files Browse the repository at this point in the history
  • Loading branch information
Constantin Gahr committed Jul 3, 2024
1 parent 3542b44 commit de84162
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions xrft/tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Test utility functions of xrft
"""

import pytest
import numpy as np
import pandas as pd
Expand Down
1 change: 1 addition & 0 deletions xrft/utils.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Utility functions for xrft
"""

import numpy as np

from .xrft import _diff_coord
Expand Down
2 changes: 1 addition & 1 deletion xrft/xrft.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit de84162

Please sign in to comment.