1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
From: Stefano Rivera <stefanor@debian.org>
Date: Fri, 3 Feb 2023 15:34:10 -0400
Subject: Skip testing nanmin() on float64 arrays on mips*el
There was an ABI break in NAN handling on MIPS that hasn't been fully
dealt with, yet. See:
https://sourceware.org/binutils/docs/as/MIPS-NaN-Encodings.html
Discussion in the numpy bug: https://github.com/numpy/numpy/issues/23158
---
src/silx/math/test/test_combo.py | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/silx/math/test/test_combo.py b/src/silx/math/test/test_combo.py
index 14b5238..79cfe6e 100644
--- a/src/silx/math/test/test_combo.py
+++ b/src/silx/math/test/test_combo.py
@@ -27,6 +27,8 @@ __license__ = "MIT"
__date__ = "17/01/2018"
+import sys
+
import numpy
from silx.utils.testutils import ParametricTestCase
@@ -161,6 +163,9 @@ class TestMinMax(ParametricTestCase):
def test_nandata(self):
"""Test min_max with NaN in data"""
for dtype in self.FLOATING_DTYPES:
+ if dtype == 'float64' and sys.implementation._multiarch in (
+ 'mips64el-linux-gnuabi64', 'mipsel-linux-gnu'):
+ continue
for data in self.NAN_TEST_DATA:
with self.subTest(dtype=dtype, data=data):
data = numpy.array(data, dtype=dtype)
@@ -178,6 +183,9 @@ class TestMinMax(ParametricTestCase):
def test_infdata(self):
"""Test min_max with inf."""
for dtype in self.FLOATING_DTYPES:
+ if dtype == 'float64' and sys.implementation._multiarch in (
+ 'mips64el-linux-gnuabi64', 'mipsel-linux-gnu'):
+ continue
for data in self.INF_TEST_DATA:
with self.subTest(dtype=dtype, data=data):
data = numpy.array(data, dtype=dtype)
|