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 deprecation warnings in tests #340

Merged
merged 5 commits into from
Dec 10, 2023

Conversation

philippemiron
Copy link
Contributor

@philippemiron philippemiron commented Dec 9, 2023

Should fix #263 and I also removed the warnings that shows up if beta=0 in:

with np.errstate(divide="ignore"):  # ignore warning when beta=0
        fm = np.where(
            beta == 0,
            np.log(2) ** (1 / gamma),
            np.exp((1 / gamma) * (np.log(beta) - np.log(gamma))),
        )

I couldn't see the deprecation warnings on my side, but I guess we want to have m as in integer, and not an array.

I also went ahead and fix some other warnings.

@philippemiron philippemiron changed the title fix deprecation warnings fix "some" deprecation warnings Dec 9, 2023
@philippemiron
Copy link
Contributor Author

ds.sizes instead of ds.dims (pydata/xarray#921).

@philippemiron
Copy link
Contributor Author

philippemiron commented Dec 9, 2023

It looks like the other warnings are from netcdf4 and numpy, so this is good to 🚀.

@philippemiron philippemiron changed the title fix "some" deprecation warnings fix deprecation warnings Dec 9, 2023
@philippemiron philippemiron changed the title fix deprecation warnings fix deprecation warnings in tests Dec 9, 2023
@selipot selipot merged commit 419f700 into Cloud-Drift:main Dec 10, 2023
15 checks passed
philippemiron added a commit to philippemiron/clouddrift that referenced this pull request Dec 10, 2023
* fix deprecation warnings

* remove complex warning

* ds.sizes instead of ds.dims which will eventually return only tuple of dimensions

* log zero in sphere

* wrong exception

---------

Co-authored-by: Philippe Miron <philippe.miron@dtn.com>
selipot added a commit that referenced this pull request Dec 16, 2023
* sofar dataset

* add test

* Subset by rows and pruning examples in docstring (#338)

* Subset by rows

* Add doctring example for pruning a dataset

* Allow querying dimensions in subset

* example edit

---------

Co-authored-by: Shane Elipot <selipot@miami.edu>

* Fix #226 (#339)

Co-authored-by: Philippe Miron <philippe.miron@dtn.com>

* fix deprecation warnings in tests (#340)

* fix deprecation warnings

* remove complex warning

* ds.sizes instead of ds.dims which will eventually return only tuple of dimensions

* log zero in sphere

* wrong exception

---------

Co-authored-by: Philippe Miron <philippe.miron@dtn.com>

* Ellipse functions (#334)

* ellipse functions

* remove comment

* lint

* typo in tests

* extra return carriage

* Update clouddrift/signal.py

Co-authored-by: Milan Curcic <caomaco@gmail.com>

* better tests

* corrected tests

* version bump

* new tests

* errstate ignore

---------

Co-authored-by: Milan Curcic <caomaco@gmail.com>

* Update datasets.py

* change name

---------

Co-authored-by: Philippe Miron <philippe.miron@dtn.com>
Co-authored-by: Milan Curcic <caomaco@gmail.com>
Co-authored-by: Shane Elipot <selipot@miami.edu>
@philippemiron philippemiron deleted the wavelet_warnings branch December 16, 2023 16:38
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 this pull request may close these issues.

DeprecationWarning in wavelet.py
2 participants