Repository navigation
Conversation
|
Putting this up for comment. It needs tests and can be made more efficient. |
|
@mhvk Thoughts? |
There was a problem hiding this comment.
I think this would mean that if there is a record in which only one element is masked, needmask would be False. If so, you'd want
needmask = not np.all(np.zeros(1, mask.dtype) == mask)
There was a problem hiding this comment.
Looking at this again afresh, I think this comment is indeed correct: if one does equality for a record mask, all elements are considered for each item, so we only can dispense with the mask if all items have no elements masked.
Note that I think the if-statement can be if mask.dtype.names:
|
@charris - see my single comment. I do think this is the right way to go. |
|
@charris - @eric-wieser has an alternative in #8647 which I think has ended up a bit cleaner. If you think so too, then maybe merge that one and close this one? |
|
@mhvk Best to go with the active PR, so I'll close this. |
Closes #5826.