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: FutureWarning in coslat check #37

Merged
merged 1 commit into from
Jan 10, 2023

Conversation

slevang
Copy link
Contributor

@slevang slevang commented Jan 9, 2023

One more small one. When supplying a custom array to weights in the xarray interface, we get:

FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
  use_coslat = True if weights == 'coslat' else False

This just checks if weights is a str before trying to compare so we don't get the warning.

@codecov-commenter
Copy link

Codecov Report

Merging #37 (d798cb6) into main (1e1694f) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main      #37   +/-   ##
=======================================
  Coverage   96.28%   96.28%           
=======================================
  Files          49       49           
  Lines        3206     3206           
=======================================
  Hits         3087     3087           
  Misses        119      119           
Impacted Files Coverage Δ
xeofs/xarray/eof.py 100.00% <100.00%> (ø)
xeofs/xarray/mca.py 98.05% <100.00%> (ø)
xeofs/xarray/rock_pca.py 98.11% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@nicrie
Copy link
Contributor

nicrie commented Jan 10, 2023

Thanks again Sam! I'll pull the PR as soon as the conda-forge review for version 0.7.1 has finished!

@nicrie nicrie merged commit 285fe0f into xarray-contrib:main Jan 10, 2023
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.

3 participants