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 hashing of definitions for non contiguous arrays #462

Merged
merged 1 commit into from
Oct 14, 2022

Conversation

mraspaud
Copy link
Member

This PR fixes the hashing of definitions based on non contiguous arrays

@mraspaud mraspaud requested a review from djhoese October 14, 2022 13:03
@mraspaud mraspaud self-assigned this Oct 14, 2022
@mraspaud
Copy link
Member Author

@ghiggi could you check if this solves your problem?

@mraspaud mraspaud marked this pull request as ready for review October 14, 2022 13:04
@mraspaud
Copy link
Member Author

To provide more info: ascontiguousarray returns the original array when it is already contiguous. So copies only happen in the subsetting case.

@mraspaud mraspaud added the bug label Oct 14, 2022
@codecov
Copy link

codecov bot commented Oct 14, 2022

Codecov Report

Merging #462 (665dd78) into main (8da4081) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #462   +/-   ##
=======================================
  Coverage   94.28%   94.28%           
=======================================
  Files          69       69           
  Lines       12388    12394    +6     
=======================================
+ Hits        11680    11686    +6     
  Misses        708      708           
Flag Coverage Δ
unittests 94.28% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pyresample/geometry.py 87.17% <100.00%> (ø)
pyresample/test/test_geometry.py 99.51% <100.00%> (+<0.01%) ⬆️

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

@mraspaud mraspaud merged commit c56533c into pytroll:main Oct 14, 2022
@mraspaud mraspaud deleted the fix-hash-noncontiguous branch October 14, 2022 13:39
@ghiggi
Copy link
Contributor

ghiggi commented Oct 17, 2022

@mraspaud yes it has solved the problem. Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SwathDefinition.update_hash() raise error after slicing the swath object
3 participants