You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import utide
import numpy as np
import matplotlib.dates as mdates
import datetime, dateutil
print(utide.__version__)
time = np.arange(0.,30.*86400,60.)
t0 = datetime.datetime(2011,9,10)
dtime = [t0+dateutil.relativedelta.relativedelta(seconds=t) for t in time]
mtime = mdates.date2num(dtime)
tdat = utide.ut_constants['const']
iM2 = tdat['name'].tolist().index('M2')
omega = tdat['freq'][iM2]
eta = 0.*np.cos(2.*np.pi*omega*time/3600.)
coef = utide.solve(mtime, eta, lat=1., method='ols', conf_int='MC')
with the following error:
(equinox) r2i2n0 datahome/aponte% python tests.py
0.2.2
/home1/datahome/aponte/.miniconda3/envs/equinox/lib/python3.6/site-packages/utide/confidence.py:255: RuntimeWarning: invalid value encountered in true_divide
Duu = Puu[c] * Duu / np.trace(Duu)
solve: matrix prep ... solution ... Traceback (most recent call last):
File "tests.py", line 57, in <module>
test_utide()
File "tests.py", line 46, in test_utide
coef = utide.solve(mtime, eta, lat=1., method='ols', conf_int='MC')
File "/home1/datahome/aponte/.miniconda3/envs/equinox/lib/python3.6/site-packages/utide/_solve.py", line 200, in solve
coef = _solv1(t, u, v, lat, **compat_opts)
File "/home1/datahome/aponte/.miniconda3/envs/equinox/lib/python3.6/site-packages/utide/_solve.py", line 375, in _solv1
W, m, B, Xu, Yu, Xv, Yv)
File "/home1/datahome/aponte/.miniconda3/envs/equinox/lib/python3.6/site-packages/utide/confidence.py", line 260, in _confidence
varcov_mCc[c, :, :] = nearestSPD(varcov_mCc[c, :, :])
File "/home1/datahome/aponte/.miniconda3/envs/equinox/lib/python3.6/site-packages/utide/confidence.py", line 139, in nearestSPD
maxeig = np.abs(np.linalg.eigvals(Ahat)).max()
File "/home1/datahome/aponte/.miniconda3/envs/equinox/lib/python3.6/site-packages/numpy/linalg/linalg.py", line 904, in eigvals
_assertFinite(a)
File "/home1/datahome/aponte/.miniconda3/envs/equinox/lib/python3.6/site-packages/numpy/linalg/linalg.py", line 216, in _assertFinite
raise LinAlgError("Array must not contain infs or NaNs")
numpy.linalg.linalg.LinAlgError: Array must not contain infs or NaNs
(equinox) r2i2n0 datahome/aponte%
The text was updated successfully, but these errors were encountered:
The following code crash:
with the following error:
The text was updated successfully, but these errors were encountered: