-
Notifications
You must be signed in to change notification settings - Fork 28
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
Climatology Missing Values Test: Use masked array data and mask to create z_idx #108
Conversation
Awesome! @iwensu0313 I don't want to tax you too much but do you believe you can come up with a test case to avoid future regressions? Something that fails in the previous code but passes now would do. |
@ocefpaf, unless I'm missing something, this test It fails previously but passes w/ the fixes added in both #107 and #108. The change introduced in this PR is meant to be part of #107, but #107 is already merged. |
I guess I was confused b/c that test passed in 107 but it shouldn't without this change, no? |
@ocefpaf yea it's a bit confusing w/ the changes spread across two PRs. Essentially I am replacing the fix in #107 with the fix here to address the same issue. The test I added in #107 tests both fixes but this is the better fix. The test in #107 passed because I moved Let me know if it's worth walking through what's happening in the The summary is that
|
If I'm missing something though.. let me know if there is an additional test case I should be testing! I am not sure what that would be. But I'm pretty sure |
My bad. I created that confusion! |
This is a follow-up PR related to #107.
While working on #107 I noticed that we were overwriting the MISSING data flag with a GOOD data flag. The #107 PR implemented a fix that is more of a bandaid that created the desired output, but doesn't address the underlying undesired behavior.
The undesired behavior was occurring because we weren't using the masked array
inp
to createz_idx
. See thread: #107 (comment). @kthyng helped find the fix for this change!I also put
flag_arr[inp.mask] = QartodFlags.MISSING
back where it was because I think we should be made aware if the underlying code is not working as expected (e.g. if newernumpy
package versions changed the way masked arrays behave).