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

BaseGrid __eq__ method no longer uses elementwise comparison #82

Merged
merged 1 commit into from
Nov 21, 2023

Conversation

claytharrison
Copy link
Contributor

If grids are not equal, numpy throws a Deprecation warning for elementwise comparison:

/home/charriso/micromamba/envs/ascat_env/lib/python3.8/site-packages/numpy/ma/core.py:4123: DeprecationWarning: elementwise comparison failed; this will raise an error in the future.
  check = compare(sdata, odata)

Using np.array_equal(arr1, arr2) rather than np.all(arr1==arr2) should fix this

If grids are not equal, numpy throws a Deprecation warning for elementwise comparison:
```
/home/charriso/micromamba/envs/ascat_env/lib/python3.8/site-packages/numpy/ma/core.py:4123: DeprecationWarning: elementwise comparison failed; this will raise an error in the future.
  check = compare(sdata, odata)
```
Using np.array_equal(arr1, arr2) rather than np.all(arr1==arr2) should fix this
@wpreimes
Copy link
Member

Thanks, I will just close and re-open this to check if the tests still pass.

@wpreimes wpreimes closed this Nov 21, 2023
@wpreimes wpreimes reopened this Nov 21, 2023
@wpreimes
Copy link
Member

Let me (or @sebhahn) know if you lack any permissions for any of the repositories you work on. We can make a new pypi release any time if you want.

@wpreimes wpreimes merged commit e5fcada into TUW-GEO:master Nov 21, 2023
12 checks passed
@claytharrison
Copy link
Contributor Author

Thanks! And yeah, I need to check equality on grids for some updates to the ascat package, so it would be useful to have this change in the pypi version. I just realized I need to also change this for CellGrid so I'll submit another PR for that shortly.

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.

2 participants