Skip to content
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

BUG: Fix masked array raveling when order="A" or order="K" #23626

Merged
merged 1 commit into from
Apr 21, 2023

Conversation

seberg
Copy link
Member

@seberg seberg commented Apr 21, 2023

This transitively fixes gh-22912. I had looked a bit into whether it is worthwhile to preserve the mask order, but TBH, we seem to not do so in so many places, that I don't think it really is worthwhile.

Applying order="K" or order="A" to the data and mask separately is an big bug though.

Closes gh-22912


order="K" is a bit annoying, we could get it right, but it didn't seem worth the trouble, especially for backporting.

This transitively fixes numpygh-22912.  I had alooked a bit into whether
it is worthwhile to preserve the mask order, but TBH, we seem to not
do so in so many places, that I don't think it really is worthwhile.

Applying `order="K"` or `order="A"` to the data and mask separately
is an big bug though.

Closes numpygh-22912
@seberg seberg added the 09 - Backport-Candidate PRs tagged should be backported label Apr 21, 2023
@seberg seberg added this to the 1.24.3 release milestone Apr 21, 2023
@seberg
Copy link
Member Author

seberg commented Apr 21, 2023

Well, unrelated, but this is a a failure I have not seen before:

(Hmmm, I don't really think that this can be due to errstate not being 100% thread-safe.)

This was a failure on "Windows Python39-32bit-full"
================================== FAILURES ===================================
____________________________ test_context_locality ____________________________

cls = <class '_pytest.runner.CallInfo'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x1DB79BB0>
when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @classmethod
    def from_call(
        cls,
        func: "Callable[[], TResult]",
        when: "Literal['collect', 'setup', 'call', 'teardown']",
        reraise: Optional[
            Union[Type[BaseException], Tuple[Type[BaseException], ...]]
        ] = None,
    ) -> "CallInfo[TResult]":
        excinfo = None
        start = timing.time()
        precise_start = timing.perf_counter()
        try:
>           result: Optional[TResult] = func()

cls        = <class '_pytest.runner.CallInfo'>
duration   = 0.025806900000020505
excinfo    = <ExceptionInfo PytestUnraisableExceptionWarning('Exception ignored in: None\n\nTraceback (most recent call last):\n  File "C:\\hosted...r: <_overlapped.Overlapped object at 0x1E09CBD0> still has pending operation at deallocation, the process may crash\n') tblen=6>
func       = <function call_runtest_hook.<locals>.<lambda> at 0x1DB79BB0>
precise_start = 557.5793509
precise_stop = 557.6051578
reraise    = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
result     = None
start      = 1682071810.5469568
stop       = 1682071810.5625904
when       = 'call'

C:\hostedtoolcache\windows\Python\3.9.13\x86\lib\site-packages\_pytest\runner.py:311: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\hostedtoolcache\windows\Python\3.9.13\x86\lib\site-packages\_pytest\runner.py:255: in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise

@charris charris merged commit 41b0722 into numpy:main Apr 21, 2023
58 checks passed
@charris
Copy link
Member

charris commented Apr 21, 2023

Thanks Sebastian.

@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Apr 21, 2023
@charris charris removed this from the 1.24.3 release milestone Apr 21, 2023
@charris
Copy link
Member

charris commented Apr 22, 2023

Hmm, the backport got a different error with Python 3.8 32 bits on Windows, access violation. I've seen that before, but not often. We should probably drop 32 bit windows wheels at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Changed behavior for masked_invalid in 1.24 for Fortran ordered arrays
2 participants