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
After updating numpy in nowcast-env on skookum from 1.22.3 to 1.24.0:
2022-12-21 12:26:38,380 CRITICAL [make_feeds] unhandled exception:
Traceback (most recent call last):
File "/SalishSeaCast/NEMO_Nowcast/nemo_nowcast/worker.py", line 391, in _do_work
checklist =self.worker_func(
File "/SalishSeaCast/SalishSeaNowcast/nowcast/workers/make_feeds.py", line 90, in make_feeds
max_ssh_info = _calc_max_ssh_risk(feed, run_date, run_type, config)
File "/SalishSeaCast/SalishSeaNowcast/nowcast/workers/make_feeds.py", line 210, in _calc_max_ssh_risk
max_ssh, max_ssh_time = _calc_max_ssh(feed, ttide, run_date, run_type, config)
File "/SalishSeaCast/SalishSeaNowcast/nowcast/workers/make_feeds.py", line 227, in _calc_max_ssh
ssh_ts = nc_tools.ssh_timeseries_at_point(grid_T_15m, 0, 0, datetimes=True)
File "/SalishSeaCast/tools/SalishSeaTools/salishsea_tools/nc_tools.py", line 357, in ssh_timeseries_at_point
time = timestamp(grid_T, range(len(ssh)), time_var=time_var)
File "/SalishSeaCast/tools/SalishSeaTools/salishsea_tools/nc_tools.py", line 270, in timestamp
results.append(time_orig + timedelta(seconds=np.asscalar(time_counter[i])))
File "/SalishSeaCast/nowcast-env/lib/python3.10/site-packages/numpy/__init__.py", line 284, in __getattr__raiseAttributeError("module {!r} has no attribute "AttributeError: module 'numpy' has no attribute 'asscalar'
The text was updated successfully, but these errors were encountered:
numpy.asscalar() was deprecated in numpy=1.16 and removed in numpy=1.23. numpy.ndarray.item() is the replacement method to use.
The traceback above leads to instances of numpy.asscalar() in SalishSeaTools. Those were fixed in SalishSeaCast/tools#71. There are also instances in make_feeds._calc_wind_4h_avg() which are fixed here.
After updating
numpy
innowcast-env
onskookum
from 1.22.3 to 1.24.0:The text was updated successfully, but these errors were encountered: