pytroll / pyresample

Geospatial image resampling in Python
http://pyresample.readthedocs.org
GNU Lesser General Public License v3.0
346 stars 94 forks source link

Fix hashing of definitions for non contiguous arrays #462

Closed mraspaud closed 1 year ago

mraspaud commented 1 year ago

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

mraspaud commented 1 year ago

@ghiggi could you check if this solves your problem?

mraspaud commented 1 year ago

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

codecov[bot] commented 1 year ago

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%) :arrow_up:

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%) :arrow_up:

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

ghiggi commented 1 year ago

@mraspaud yes it has solved the problem. Thanks !