Skip to content

Commit

Permalink
Merge pull request #1000 from xylar/fix-tukey
Browse files Browse the repository at this point in the history
Fix tukey import in latest scipy
  • Loading branch information
xylar committed Apr 19, 2024
2 parents da72e59 + e934aa0 commit 3ff2e5c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ci/recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ requirements:
- pyremap >=1.2.0,<2.0.0
- python-dateutil
- requests
- scipy
- scipy >=1.7.0
- setuptools
- shapely >=2.0,<3.0
- xarray >=0.14.1
Expand Down
2 changes: 1 addition & 1 deletion dev-spec.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pyproj
pyremap>=1.2.0,<2.0.0
python-dateutil
requests
scipy
scipy >=1.7.0
setuptools
shapely>=2.0,<3.0
xarray>=0.14.1
Expand Down
3 changes: 2 additions & 1 deletion mpas_analysis/ocean/index_nino34.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import pandas as pd
import numpy as np
from scipy import signal, stats
from scipy.signal.windows import tukey
import matplotlib.pyplot as plt

from mpas_analysis.shared.climatology import climatology
Expand Down Expand Up @@ -400,7 +401,7 @@ def _compute_nino34_spectra(self, nino34Index):

# Move nino34Index to numpy to allow functionality with scipy routines
ninoIndex = nino34Index.values
window = signal.tukey(len(ninoIndex), alpha=0.1)
window = tukey(len(ninoIndex), alpha=0.1)
f, Pxx = signal.periodogram(window * ninoIndex,
1.0 / constants.sec_per_month)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
'pyproj',
'python-dateutil',
'requests',
'scipy',
'scipy>=1.7.0',
'setuptools',
'shapely>=2.0,<3.0',
'six',
Expand Down

0 comments on commit 3ff2e5c

Please sign in to comment.