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
Split from #149. array.array buffers compile zero-copy, but numpy arrays cannot simply reuse that path without breaking CPython identity. Verified with numpy 2.5.4 on 3.15t:
In the interpreter, element arithmetic produces numpy scalars (np.float64, np.int64, np.bool); s += v over the elements returns np.float64. Compiled code would return float.
numpy scalar ops emit RuntimeWarnings (overflow, invalid value), and division by zero warns instead of raising.
Design needed:
taint tracking of values derived from numpy elements;
boxing returned or escaping tainted values as the matching numpy scalar type;
reproducing numpy's floating-point warnings (FP exception flags turned into the same RuntimeWarning per operation site);
numpy's division semantics on tainted values.
Done when: compiled numpy functions match the interpreter in results, result types and emitted warnings (checked with warnings.catch_warnings(record=True)), and the nbody-style 7-array functions compile.
Landed in develop via #263 (step 1) and #264 (step 2). Follow-ups: bool arrays #261; int64 element arithmetic in impure functions stays on the object path.
Activity
Fix: Drop the numpy buffer kind; array.array only (#149, numpy is #220)
Merge pull request #263 from thisisthepy/feat/tp-numpy
b-re-w commentedon Oct 24, 2026
Step 1 landed via #263. Step 2 (numpy warnings in impure functions, division, impure element arithmetic) next.
Merge pull request #264 from thisisthepy/feat/tp-numpy2
b-re-w commentedon Oct 24, 2026
Landed in develop via #263 (step 1) and #264 (step 2). Follow-ups: bool arrays #261; int64 element arithmetic in impure functions stays on the object path.