You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The behavior of ma.masked_invalid seems to have changed from 1.23 to 1.24 in a breaking way for Fortran ordered arrays. I assume it could be related to #22046. To me, this seems like a bug, although I am not that familiar with the background for this change.
Reproduce the code example:
importnumpyasnpa=np.array([np.nan, np.nan, np.nan, 1, 1, 1]).reshape((3, 2), order="F")
a_masked=np.ma.masked_invalid(a)
print(np.isfortran(a_masked.data), np.isfortran(a_masked.mask))
# Expected output: True True# Output in 1.24: True False# Output in 1.23: True True# A specific implication is that the following produces the wrong result:print(np.isnan(a.ravel(order="K").data).any()) # Yields True for 1.24, but should be False
Error message:
No response
Runtime information:
import sys, numpy; print(numpy.version); print(sys.version)
1.24.1
3.8.15 | packaged by conda-forge | (default, Nov 22 2022, 08:42:03) [MSC v.1929 64 bit (AMD64)]
print(numpy.show_runtime())
WARNING: threadpoolctl not found in system! Install it by pip install threadpoolctl. Once installed, try np.show_runtime again for more detailed build information
[{'simd_extensions': {'baseline': ['SSE', 'SSE2', 'SSE3'],
'found': ['SSSE3',
'SSE41',
'POPCNT',
'SSE42',
'AVX',
'F16C',
'FMA3',
'AVX2',
'AVX512F',
'AVX512CD',
'AVX512_SKX',
'AVX512_CLX',
'AVX512_CNL',
'AVX512_ICL'],
'not_found': []}}]
None
Context for the issue:
No response
The text was updated successfully, but these errors were encountered:
This transitively fixesnumpygh-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.
Closesnumpygh-22912
This transitively fixesnumpygh-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.
Closesnumpygh-22912
Describe the issue:
The behavior of
ma.masked_invalid
seems to have changed from 1.23 to 1.24 in a breaking way for Fortran ordered arrays. I assume it could be related to #22046. To me, this seems like a bug, although I am not that familiar with the background for this change.Reproduce the code example:
Error message:
No response
Runtime information:
import sys, numpy; print(numpy.version); print(sys.version)
1.24.1
3.8.15 | packaged by conda-forge | (default, Nov 22 2022, 08:42:03) [MSC v.1929 64 bit (AMD64)]
print(numpy.show_runtime())
WARNING:
threadpoolctl
not found in system! Install it bypip install threadpoolctl
. Once installed, trynp.show_runtime
again for more detailed build information[{'simd_extensions': {'baseline': ['SSE', 'SSE2', 'SSE3'],
'found': ['SSSE3',
'SSE41',
'POPCNT',
'SSE42',
'AVX',
'F16C',
'FMA3',
'AVX2',
'AVX512F',
'AVX512CD',
'AVX512_SKX',
'AVX512_CLX',
'AVX512_CNL',
'AVX512_ICL'],
'not_found': []}}]
None
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: