Skip to content

Commit c417f05

Browse files
committed
fix non-integer index error
1 parent fabd520 commit c417f05

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pywt/data/_readers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ def nino():
174174
sst_csv = np.load(fname)['sst_csv']
175175
# sst_csv = pd.read_csv("http://www.cpc.ncep.noaa.gov/data/indices/ersst4.nino.mth.81-10.ascii", sep=' ', skipinitialspace=True)
176176
# take only full years
177-
n = np.floor(sst_csv.shape[0]/12.)*12.
177+
n = int(np.floor(sst_csv.shape[0]/12.)*12.)
178178
# Building the mean of three mounth
179179
# the 4. column is nino 3
180-
sst = np.mean(np.reshape(np.array(sst_csv)[:n,4],(n/3,-1)),axis=1)
180+
sst = np.mean(np.reshape(np.array(sst_csv)[:n, 4], (n//3, -1)), axis=1)
181181
sst = (sst - np.mean(sst)) / np.std(sst, ddof=1)
182182

183183
dt = 0.25

0 commit comments

Comments
 (0)