Skip to content

FIX: if the first elements of an array are masked keep checking #14429

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

Merged
merged 2 commits into from
Jun 7, 2019

Conversation

tacaswell
Copy link
Member

closes #14356

This is a slight modification and a test of what @anntzer proposed in the issue.

Will not back port cleanly but 🤷‍♀️ .

@tacaswell tacaswell added this to the v3.1.1 milestone Jun 3, 2019
jklymak
jklymak previously approved these changes Jun 3, 2019
@jklymak jklymak dismissed their stale review June 4, 2019 00:29

test failure was real.

@jklymak
Copy link
Member

jklymak commented Jun 4, 2019

@tacaswell, I directly edited a change to this. Hope that was OK.

I approved this, but you could self-merge on my changes to get the test to work, or someone else could merge; I don't think I should merge since I last edited...

@tacaswell
Copy link
Member Author

Thanks @jklymak !

In general assume you can push non-controversial stuff to any of my branches.

@tacaswell
Copy link
Member Author

@anntzer had some questions about this in #14356 . I think that keeping checking until we find an un-masked element is the correct behavior which seems safer than assuming that a fill value will have the right units.

@jklymak
Copy link
Member

jklymak commented Jun 4, 2019

Yeah, though it is kind of wasteful for a long masked-out array. We still should sit down an write a specification for what units are and how they can be packed, because I'm not sure how we would get in the situation where a masked out element would have different units than the unmasked elements.

Also what happens if the whole array is masked? I'm not sure this will ever return anything?

@tacaswell
Copy link
Member Author

It will have the same behavior as passing an empty list (which is to return None which may or may not be what we want it to do, but at least it is consistent?)

@dstansby dstansby merged commit 177f9df into matplotlib:master Jun 7, 2019
@lumberbot-app
Copy link

lumberbot-app bot commented Jun 7, 2019

Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

  1. Checkout backport branch and update it.
$ git checkout v3.1.x
$ git pull
  1. Cherry pick the first parent branch of the this PR on top of the older branch:
$ git cherry-pick -m1 177f9df5d2292369f3ce0544be1b3952e61c2f47
  1. You will likely have some merge/cherry-pick conflict here, fix them and commit:
$ git commit -am 'Backport PR #14429: FIX: if the first elements of an array are masked keep checking'
  1. Push to a named branch :
git push YOURFORK v3.1.x:auto-backport-of-pr-14429-on-v3.1.x
  1. Create a PR against branch v3.1.x, I would have named this PR:

"Backport PR #14429 on branch v3.1.x"

And apply the correct labels and milestones.

Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon!

If these instruction are inaccurate, feel free to suggest an improvement.

dstansby added a commit to dstansby/matplotlib that referenced this pull request Jun 7, 2019
FIX: if the first elements of an array are masked keep checking
dstansby added a commit that referenced this pull request Jun 7, 2019
@tacaswell tacaswell deleted the fix_scatter_units branch June 10, 2019 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

matplotlib.units.ConversionError on scatter of dates with a NaN in the first position
4 participants