OGGM / massbalance-sandbox

New generation of OGGM mass-balance models
BSD 3-Clause "New" or "Revised" License
6 stars 11 forks source link

code upgrade: `pandas.dataframe.astype(np.datetime64)` needs to change to `pandas.dataframe.astype('datetime64[ns]')` #50

Open bearecinos opened 6 months ago

bearecinos commented 6 months ago

This avoids some extra test fails due to this problem:

https://stackoverflow.com/questions/31917964/python-numpy-cannot-convert-datetime64ns-to-datetime64d-to-use-with-numba https://pandas.pydata.org/docs/user_guide/timeseries.html#overview

replace all pandas.Dataframe..astype(np.datetime64) with pandas.Dataframe.astype('datetime64[ns]')

Fixing the variable names in test_hydro plus this leads to only 4 tests failing.