Skip to content

Issue 4: Fixed bug where VariableInfo equality fails when _FillValue is np.nan#5

Merged
stephenykp merged 3 commits intodevelopfrom
issue-4
Nov 18, 2021
Merged

Issue 4: Fixed bug where VariableInfo equality fails when _FillValue is np.nan#5
stephenykp merged 3 commits intodevelopfrom
issue-4

Conversation

@stephenykp
Copy link

Github Issue: #4

Description

The granule variable equality check is failing for the granules tested in #4. This leads to

2021-11-17T16:52:52.435Z [debug]: FROM WORKER LOG: ERROR:root:Variable schemas are inconsistent between granules

Overview of work done

Because of the following:

>>> np.nan == np.nan
False

we are seeing errors if the _FillValue is np.nan, because the equality check fails. Added an extra check if the equality check fails

>>> np.array_equal(np.nan, np.nan, equal_nan=True)
True

Overview of verification done

Overview of integration done

N/A

PR checklist:

  • Linted
  • Updated unit tests
  • Updated changelog
  • Integration testing

See Pull Request Review Checklist for pointers on reviewing this pull request

@stephenykp stephenykp requested review from a team, frankinspace and sliu008 November 18, 2021 00:18
@stephenykp stephenykp merged commit 05e2eb8 into develop Nov 18, 2021
@stephenykp stephenykp deleted the issue-4 branch November 18, 2021 00:44
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