can_elide_temp() in temp_elide.c incorrectly identifies new-style user-defined
dtypes as numeric types eligible for in-place buffer reuse. For large arrays this
silently rewrites a*a + b*b into (a*a) += (b*b), which raises a TypeError
when the result dtype of the in-place add does not match the pre-allocated buffer.
PyArray_NewFromDescr_int in ctors.c leaks the data buffer when a
user-defined DType's fill-zero loop raises an error.
This affects any DType that defines a get_fill_zero_loop that can fail —
for example, a fixed-point DType whose fill-zero rejects zero because it
falls outside the type's representable range.
OlderNewer