-
Notifications
You must be signed in to change notification settings - Fork 300
Coord nan equal #3283
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
Coord nan equal #3283
Changes from all commits
9c2c7c2
8dc38d0
5db955d
4e02a0f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| # (C) British Crown Copyright 2014 - 2015, Met Office | ||
| # (C) British Crown Copyright 2014 - 2019, Met Office | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did you want to follow your suggested approach and remove the year
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The template for the new file headers is here:
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think I'd rather do it separately. My reason is, I just realised, we are going to have to modify the licence-header check in
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, that makes sense 👍 |
||
| # | ||
| # This file is part of Iris. | ||
| # | ||
|
|
@@ -115,6 +115,25 @@ def test_string_arrays_0d_and_scalar(self): | |
| self.assertFalse(array_equal(array_a, 'foo')) | ||
| self.assertFalse(array_equal(array_a, 'foobar.')) | ||
|
|
||
| def test_nan_equality_nan_ne_nan(self): | ||
| array = np.array([1.0, np.nan, 2.0, np.nan, 3.0]) | ||
| self.assertFalse(array_equal(array, array)) | ||
|
|
||
| def test_nan_equality_nan_naneq_nan(self): | ||
| array_a = np.array([1.0, np.nan, 2.0, np.nan, 3.0]) | ||
| array_b = np.array([1.0, np.nan, 2.0, np.nan, 3.0]) | ||
| self.assertTrue(array_equal(array_a, array_b, withnans=True)) | ||
|
|
||
| def test_nan_equality_nan_nanne_a(self): | ||
| array_a = np.array([1.0, np.nan, 2.0, np.nan, 3.0]) | ||
| array_b = np.array([1.0, np.nan, 2.0, 0.0, 3.0]) | ||
| self.assertFalse(array_equal(array_a, array_b, withnans=True)) | ||
|
|
||
| def test_nan_equality_a_nanne_b(self): | ||
| array_a = np.array([1.0, np.nan, 2.0, np.nan, 3.0]) | ||
| array_b = np.array([1.0, np.nan, 2.0, np.nan, 4.0]) | ||
| self.assertFalse(array_equal(array_a, array_b, withnans=True)) | ||
|
|
||
|
|
||
| if __name__ == '__main__': | ||
| tests.main() | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm torn with this.
Part of me wants it in under a sub-heading, similar to the "Bugs fixed in 1.7.3" sub headings in the 1.7 what's new but I'm not sure...
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. It's awkward because bugfix releases aren't supposed to contain new features !
We could treat the new keyword as a "private matter" for now, and then announce it with enormous fanfare in the nest minor release ??
I think that means putting the whatsnew contribution back into a textfile in a contributions_2.3.0 directory. The actual code changes (+docstring) can stay though,
Would you favour that solution @lbdreyer ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the outcome of the offline discussion was to keep what you have already done.
Admittedly the reasons for that decision are a little fuzzy we discussed this over a week ago, but I think I personally wanted to not keep it private, but not add confusion by adding a "features added in 2.2.1" section
So basically, I'm happy with this change as it is.