Package: python-numpy / 1:1.12.1-3

Metadata

Package Version Patches format
python-numpy 1:1.12.1-3 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
03_force_f2py_version.patch | (download)

numpy/f2py/setup.py | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 force generation f2py postfixed with interpreter version

Patch-Name: 03_force_f2py_version.patch

10_use_local_python.org_object.inv_sphinx.diff | (download)

doc/source/conf.py | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 use a local copy of object.inv from doc.python.org, instead of
 downloading it each time from the internet

python3 soabi.patch | (download)

numpy/ctypeslib.py | 8 8 + 0 - 0 !
numpy/tests/test_ctypeslib.py | 1 1 + 0 - 0 !
2 files changed, 9 insertions(+)

 adapt to python3 multiarch soabi

 python3 soabi contains multiarch but does not export it via SOABI. So hardcode
 it and disable a test. get_shared_lib_extension can't be properly fixed:
 doko: we still want this as the default for people building extensions not
        only for the distribution
 Nothing in debian uses it to get the python extension.
adapt_swig_docs_to_debian.patch | (download)

doc/source/reference/swig.interface-file.rst | 4 2 + 2 - 0 !
doc/source/reference/swig.testing.rst | 3 2 + 1 - 0 !
2 files changed, 4 insertions(+), 3 deletions(-)

 adapt swig documentation to debian

 Location of `swig` directory in Debian is specific to our distro, so the
 documentation needs adaptation.
0005 Dont fail if we cant import mingw32.patch | (download)

numpy/core/setup_common.py | 5 4 + 1 - 0 !
1 file changed, 4 insertions(+), 1 deletion(-)

 dont fail if we cant import mingw32

This is required for the Debian version helper, which reads core.setup_common and
executes it, without using all the Python import machinery. This way we will
skip the requirement to have the whole numpy module working while we only care
(at this point) for the API/ABI versions.

0006 disable asserts on ppc with broken malloc only longd.patch | (download)

numpy/core/src/multiarray/lowlevel_strided_loops.c.src | 7 7 + 0 - 0 !
1 file changed, 7 insertions(+)

 disable asserts on ppc with broken malloc only longdouble affected
 will still work with softfaults

0007 BUG Don t signal FP exceptions in np.absolute.patch | (download)

numpy/core/src/umath/loops.c.src | 1 1 + 0 - 0 !
numpy/core/tests/test_umath.py | 30 14 + 16 - 0 !
2 files changed, 15 insertions(+), 16 deletions(-)

 bug: don't signal fp exceptions in np.absolute

Fixes #8686

This PR centers around this piece of code in `numpy/core/src/umath/loops.c.src`:
```c
UNARY_LOOP {
    const @type@ in1 = *(@type@ *)ip1;
    const @type@ tmp = in1 > 0 ? in1 : -in1;
    /* add 0 to clear -0.0 */
    *((@type@ *)op1) = tmp + 0;
}
```

If in1 is `NaN`, the C99 standard requires that the comparison `in1 > 0`
signals `FE_INVALID`, but the usual semantics for the absolute function are
that no FP exceptions should be generated (eg compare to C `fabs` and Python
`abs`). This was probably never noticed due to a bug in GCC x86 where all
floating point comparisons do not signal exceptions, however Clang on x86 and
GCC on other architectures (including ARM and MIPS) do signal an FP exception
here.

Fix by clearing the floating point exceptions after the loop has
finished. The alternative of rewriting the loop to use `npy_fabs`
instead would also work but has performance issues because that function
is not inlined. The `test_abs_neg_blocked` is adjusted not to ignore
`FE_INVALID` errors because now both absolute and negate should never
produce an FP exceptions.