BUG: Iris AreaWeighted regrid float tolerance bug#2201
Closed
cpelley wants to merge 3 commits intoSciTools:masterfrom
Closed
BUG: Iris AreaWeighted regrid float tolerance bug#2201cpelley wants to merge 3 commits intoSciTools:masterfrom
cpelley wants to merge 3 commits intoSciTools:masterfrom
Conversation
Author
|
I have started an iris dev discussion on the wider issue of dealing with floats in iris here. |
Author
|
Two exceptions raised. One under python3.4 test target: default: ======================================================================
ERROR: test_simple (iris.tests.test_mapping.TestUnmappable)
----------------------------------------------------------------------
Traceback (most recent call last):
...
ValueError: Image comparison failed. Message: Actual SHA1 020e0ca45a9fbd5caef915e59c02276725919889 not in expected ['6c139dab88d9e5884d313f1a607de5e9c4fe5a93', 'a14231d0f6fe19de89dfd200d25f1d7dbc31b2ff'] for test iris.tests.test_mapping.TestUnmappable.test_simple.0.The second under python3.4 test target: example: ======================================================================
ERROR: test_atlantic_profiles (example_tests.test_atlantic_profiles.TestAtlanticProfiles)
----------------------------------------------------------------------
Traceback (most recent call last):
...
ValueError: Image comparison failed. Message: Actual SHA1 f25dc9acc16a887eb224b4970d3042f5bcfd9743 not in expected ['0bde47fbbc4a15498c0ecb8bd3eb5e63339e5121', 'b8365851d0b4b5589289026eda692c643499c7f3', 'c3a2ccc6873ddee7ea0dafd25498b743ffece4fa', '4cbda27eb65fc360d08dde0ccf40b951fdfe4453', '3a2f43bc6b1bd4397a8eb6877a128ab7a4f051ff', 'da5cd8269bcc96533c8c2f4a788e2c980381dfef'] for test example_tests.test_atlantic_profiles.TestAtlanticProfiles.test_atlantic_profiles.0.Anyone might know what this might specifically effect only python3.4? |
Member
@cpelley unfortunately, lots of things we have moved swiftly onto perceptual hashing, to let us handle issues such as this please rebase and see how this affects your change, it should help with image comparison issues |
077701b to
3741531
Compare
Author
Author
|
Closing this as it is replaced by #2237 which points to v1.11.x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Floating point equality without tolerance within
iris.experimental.regrid._within_boundsproduces masked results under circumstances where different longitude ranges are wrapped by wrap_lons here when we expect them to be equal (i.e. there is a loss of precision).Here is a break point at within_bounds for the case where the source longitude extent is [-91, 0] and the target longitude extent is [270, 360]:
You will note the 6.66133815e-16 value which makes the equality checks fail, since 0 != 6.66133815e-16.
See the added unittest for the full working example.