diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2022-06-21 16:09:31 -0700 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2022-06-21 16:09:31 -0700 |
commit | 0884dab487870646d669157a3e2524622ab1cdf4 (patch) | |
tree | 7919306386be830aa2ce9fd9c606a405f3e5c39f /numpy/array_api/_array_object.py | |
parent | 70026c4dde47d89d6a7a4916bfac045e714a5b4f (diff) | |
download | numpy-0884dab487870646d669157a3e2524622ab1cdf4.tar.gz |
ENH: Always fill object fields with None rather than NULL
The intention here is to transition (or achieve?) a future where
NumPy always fills object fields with None rather than NULL.
Filling with NULL is nice (infinitely fast in some cases and easy),
but it also adds the trap of expecting NULLs everywhere.
Most importantly, cython fails to do so (currently) so this is a
bug magnet.
At this point, ideally any fully created array is guaranteed to be
initialized with proper Python objects. Downstream may break that,
so we should not allow it, but this does also add an assert to
many ufuncs to flush out further potential issues.
NULL initialization is (as of now) still relevant for new buffers.
That means that core functionality like `setitem`, or coping into
a buffer should still expect a NULL initialized value.
Diffstat (limited to 'numpy/array_api/_array_object.py')
0 files changed, 0 insertions, 0 deletions