Fix Numpy 1.20.0 by initializing PyArray_Descr portably
Merged
requested to merge leo-singer/lalsuite:numpy-1.20.0-compatible-dtype-initialization into master
Compare changes
Files
3+ 0
− 1
According to the Numpy documentation:
To ensure compatibility:
- Never declare a non-pointer instance of the struct
- Never perform pointer arithmatic
- Never use
sizof(PyArray_Descr)
The SWIG bindings broke the first of these rules. Improper order of initialization led to a null pointer that was causing a segfault.
Fixes #414 (closed). (We shall see!)
If any of the Backwards Incompatible check boxes are ticked please provide a justification why this change is necessary and why it needs to be done in a backwards incompatible way.
N/A