Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix numpy and pandas deprecationwarning #319

Closed
veenstrajelmer opened this issue Jun 20, 2024 · 0 comments · Fixed by #321
Closed

fix numpy and pandas deprecationwarning #319

veenstrajelmer opened this issue Jun 20, 2024 · 0 comments · Fixed by #321

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Jun 20, 2024

FutureWarning Minute.delta:

tests/test_timeseries.py::test_resample_timeseries
  /home/runner/work/hatyan/hatyan/tests/test_timeseries.py:358: FutureWarning: Minute.delta is deprecated and will be removed in a future version. Use pd.Timedelta(obj) instead
    assert np.isclose(ts_prediction_res.index.freq.delta.total_seconds(), 60*timestep_min)

DeprecationWarning in np.in1d:

tests/test_cli.py: 1 warning
tests/test_hatyan.py: 18 warnings
tests/test_metadata.py: 2 warnings
tests/test_timeseries.py: 2 warnings
  /home/runner/work/hatyan/hatyan/hatyan/timeseries.py:110: DeprecationWarning: `in1d` is deprecated. Use `np.isin` instead.
    LWid_main = LWid_main_raw[np.in1d(LWid_main_raw,validtimes_idx)]
tests/test_cli.py: 1 warning
tests/test_hatyan.py: 18 warnings
tests/test_metadata.py: 2 warnings
tests/test_timeseries.py: 2 warnings
  /home/runner/work/hatyan/hatyan/hatyan/timeseries.py:111: DeprecationWarning: `in1d` is deprecated. Use `np.isin` instead.
    HWid_main = HWid_main_raw[np.in1d(HWid_main_raw,validtimes_idx)]
tests/test_hatyan.py::test_frommergedcomp_HWLW_345[HOEKVHLD]
tests/test_hatyan.py::test_frommergedcomp_HWLW_345[DENHDR]
tests/test_hatyan.py::test_hwlw_numbering_aggers
tests/test_hatyan.py::test_hwlw_numbering_aggers
  /home/runner/work/hatyan/hatyan/hatyan/timeseries.py:[127](https://github.com/Deltares/hatyan/actions/runs/9413410495/job/26639319654#step:7:127): DeprecationWarning: `in1d` is deprecated. Use `np.isin` instead.
    LW_local_bool = ~np.in1d(LWid_all, LWid_main)
tests/test_hatyan.py::test_frommergedcomp_HWLW_345[HOEKVHLD]
tests/test_hatyan.py::test_frommergedcomp_HWLW_345[DENHDR]
tests/test_hatyan.py::test_hwlw_numbering_aggers
tests/test_hatyan.py::test_hwlw_numbering_aggers
  /home/runner/work/hatyan/hatyan/hatyan/timeseries.py:[130](https://github.com/Deltares/hatyan/actions/runs/9413410495/job/26639319654#step:7:130): DeprecationWarning: `in1d` is deprecated. Use `np.isin` instead.
    HW_local_bool = ~np.in1d(HWid_all, HWid_main)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant