summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2022-08-08 15:21:46 -0500
committerGitHub <noreply@github.com>2022-08-08 15:21:46 -0500
commit74a042a2e52228bd571b2ff924f121255d65423b (patch)
treee22ed52f2b29f433afc7d6fcf236dae5cea051c2
parent0327e51391b5f1adf7e24dcbbf4b220980d3d600 (diff)
parentb287cd1cc3b885c8705884debcce7f27f47c0878 (diff)
downloadnumpy-74a042a2e52228bd571b2ff924f121255d65423b.tar.gz
Merge pull request #22083 from Flamefire/tmp
BUG: Fix skip condition for test_loss_of_precision[complex256]
-rw-r--r--numpy/core/tests/test_umath.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/numpy/core/tests/test_umath.py b/numpy/core/tests/test_umath.py
index 70c5fc0e5..917ae58ab 100644
--- a/numpy/core/tests/test_umath.py
+++ b/numpy/core/tests/test_umath.py
@@ -27,12 +27,17 @@ def on_powerpc():
def bad_arcsinh():
- """The blocklisted trig functions are not accurate on aarch64 for
+ """The blocklisted trig functions are not accurate on aarch64/PPC for
complex256. Rather than dig through the actual problem skip the
test. This should be fixed when we can move past glibc2.17
which is the version in manylinux2014
"""
- x = 1.78e-10
+ if platform.machine() == 'aarch64':
+ x = 1.78e-10
+ elif on_powerpc():
+ x = 2.16e-10
+ else:
+ return False
v1 = np.arcsinh(np.float128(x))
v2 = np.arcsinh(np.complex256(x)).real
# The eps for float128 is 1-e33, so this is way bigger
@@ -3591,10 +3596,10 @@ class TestComplexFunctions:
x_basic = np.logspace(-2.999, 0, 10, endpoint=False)
if dtype is np.longcomplex:
- if (platform.machine() == 'aarch64' and bad_arcsinh()):
+ if bad_arcsinh():
pytest.skip("Trig functions of np.longcomplex values known "
- "to be inaccurate on aarch64 for some compilation "
- "configurations.")
+ "to be inaccurate on aarch64 and PPC for some "
+ "compilation configurations.")
# It's not guaranteed that the system-provided arc functions
# are accurate down to a few epsilons. (Eg. on Linux 64-bit)
# So, give more leeway for long complex tests here: