-
-
Notifications
You must be signed in to change notification settings - Fork 12.2k
BUG: fill violating read-only flag #22922
Description
Describe the issue:
Behavior of numpy 1.24.1 changed to fill on read-only arrays.
Reproduce the code example:
import numpy as np
a = np.zeros(11)
a.setflags(write=False)
a.fill(0)Error message:
A ValueError exception expected but is no longer raised.Runtime information:
1.24.1
3.11.0 (v3.11.0:deaf509e8f, Oct 24 2022, 14:43:23) [Clang 13.0.0 (clang-1300.0.29.30)]
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': ['NEON', 'NEON_FP16', 'NEON_VFPV4', 'ASIMD'],
'found': ['ASIMDHP', 'ASIMDDP'],
'not_found': ['ASIMDFHM']}}]
None
This changed in behavior has occurred on all our CI systems, windows, Mac and linux. And with python versions 3.7 to 3.11
Context for the issue:
Our regression test suit is failing. It provides an opportunity for data to unexpectedly change, and invalid states in the software could be entered with undefined behavior.