GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — BUG: cast error during buffered fancy-index assignment is swallowed (SystemError or silently leaked exception) · Issue #31974 · numpy/numpy Closed Labels DescriptionDescribe the issue:If Small arrays raise a clean Root cause: a cast failure during buffer refill makes Reproduce the code example:import numpy as np N = 20000 # > 8192 (one buffer chunk) dst = np.zeros(N, dtype=int) vals = np.arange(N, dtype=object) vals[9000] = None # in the second chunk dst[np.arange(N)] = vals # does NOT raise print("got here") # leaked TypeError detonates here or later Error message:got here Traceback (most recent call last): File "repro.py", line 9, in <module> print("got here") TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType' Same assignment via np.put_along_axis raises immediately instead, but as: SystemError: <function put_along_axis at 0x...> returned a result with an exception set dst has the first 8192 elements written, rest untouched. The partial write is expected (see gh-31965 / gh-31940); this issue is only the swallowed exception. Python and NumPy Versions:NumPy 2.2.4, 2.5.1, and main @ 9ef40d3. Python 3.13.5, Linux x86_64 (Debian 13). Runtime Environment:No response How does this issue affect you or how did you find it:Found while auditing partial-write behavior for gh-31965. ActivityMetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |