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
Proving lat=0 leads to a crash with the following example:
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 = 1.*np.cos(2.*np.pi*omega*time/3600.)
coef = utide.solve(mtime, eta, lat=0., method='ols', conf_int='MC')
With the following error message:
(equinox) r2i2n0 datahome/aponte% python tests.py
0.2.2
/home1/datahome/aponte/.miniconda3/envs/equinox/lib/python3.6/site-packages/utide/harmonics.py:132: RuntimeWarning: divide by zero encountered in double_scalars
rr[j] *= 0.36309 * (1.0 - 5.0 * slat**2)/slat
/home1/datahome/aponte/.miniconda3/envs/equinox/lib/python3.6/site-packages/numpy/core/_methods.py:32: RuntimeWarning: invalid value encountered in reduce
return umr_sum(a, axis, dtype, out, keepdims)
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=0., 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 291, in _solv1
m = np.linalg.lstsq(B, xraw, rcond=None)[0]
File "/home1/datahome/aponte/.miniconda3/envs/equinox/lib/python3.6/site-packages/numpy/linalg/linalg.py", line 2031, in lstsq
0, work, lwork, rwork, iwork, 0)
ValueError: On entry to DLASCL parameter number 4 had an illegal value
(equinox) r2i2n0 datahome/aponte%
The text was updated successfully, but these errors were encountered:
Proving
lat=0
leads to a crash with the following example:With the following error message:
The text was updated successfully, but these errors were encountered: