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.
Activity
Fix: Drop the numpy buffer kind; array.array only (#149, numpy is #220)