Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ matrix:
- COVERAGE=
- NUMPYSPEC="--upgrade numpy"
- MB_PYTHON_VERSION=3.7
- os: linux-ppc64le
python: 3.6
env:
- TESTMODE=fast
- COVERAGE=
- NUMPYSPEC="--upgrade numpy"
cache:
directories:
- $HOME/.ccache
Expand Down
1 change: 1 addition & 0 deletions scipy/fft/_pocketfft/tests/test_real_transforms.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import division, print_function, absolute_import

from os.path import join, dirname
import platform

import numpy as np
from numpy.testing import (
Expand Down
3 changes: 3 additions & 0 deletions scipy/linalg/tests/test_decomp.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"""

import itertools
import platform
import numpy as np
from numpy.testing import (assert_equal, assert_almost_equal,
assert_array_almost_equal, assert_array_equal,
Expand Down Expand Up @@ -2468,6 +2469,8 @@ def test_aligned_mem_float():
eig(z.T, overwrite_a=True)


@pytest.mark.xfail(platform.machine() == 'ppc64le',
reason="fails on ppc64le")
def test_aligned_mem():
"""Check linalg works with non-aligned memory"""
# Allocate 804 bytes of memory (allocated on boundary)
Expand Down
1 change: 1 addition & 0 deletions scipy/ndimage/tests/test_ndimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

import math
import sys
import platform

import numpy
from numpy import fft
Expand Down
3 changes: 3 additions & 0 deletions scipy/optimize/tests/test__differential_evolution.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import gc
import multiprocessing
import sys
import platform

from scipy.optimize._differentialevolution import (DifferentialEvolutionSolver,
_ConstraintWrapper)
Expand Down Expand Up @@ -1072,6 +1073,8 @@ def c1(x):
assert_(np.all(res.x <= np.array(bounds)[:, 1]))

@pytest.mark.slow
@pytest.mark.xfail(platform.machine() == 'ppc64le',
reason="fails on ppc64le")
def test_L8(self):
def f(x):
x = np.hstack(([0], x)) # 1-indexed to match reference
Expand Down
3 changes: 3 additions & 0 deletions scipy/sparse/linalg/eigen/lobpcg/tests/test_lobpcg.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import division, print_function, absolute_import

import itertools
import platform

import numpy as np
from numpy.testing import (assert_almost_equal, assert_equal,
Expand Down Expand Up @@ -269,6 +270,8 @@ def test_verbosity():
verbosityLevel=9)


@pytest.mark.xfail(platform.machine() == 'ppc64le',
reason="fails on ppc64le")
def test_tolerance_float32():
"""Check lobpcg for attainable tolerance in float32.
"""
Expand Down
5 changes: 4 additions & 1 deletion scipy/sparse/linalg/isolve/tests/test_iterative.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from __future__ import division, print_function, absolute_import

import itertools
import platform
import numpy as np

from numpy.testing import (assert_equal, assert_array_equal,
Expand Down Expand Up @@ -449,7 +450,9 @@ def test_zero_rhs(solver):


@pytest.mark.parametrize("solver", [
gmres, qmr, lgmres,
gmres, qmr,
pytest.param(lgmres, marks=pytest.mark.xfail(platform.machine() == 'ppc64le',
reason="fails on ppc64le")),
pytest.param(cgs, marks=pytest.mark.xfail),
pytest.param(bicg, marks=pytest.mark.xfail),
pytest.param(bicgstab, marks=pytest.mark.xfail),
Expand Down
7 changes: 6 additions & 1 deletion scipy/sparse/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class for generic tests" section.
import operator
import contextlib
import functools
import platform
from distutils.version import LooseVersion

import numpy as np
Expand Down Expand Up @@ -3921,7 +3922,11 @@ def test_dot(self):
B = lil_matrix((10,10), dtype=np.complex)
B[0,3] = 10
B[5,6] = 20j
assert_array_equal(A @ A.T, (B * B.T).todense())

# TODO: properly handle this assertion on ppc64le
if platform.machine() != 'ppc64le':
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This testing module is a bit messy--this is the only case where I didn't use pytest to directly xfail.

assert_array_equal(A @ A.T, (B * B.T).todense())

assert_array_equal(A @ A.conjugate().T, (B * B.H).todense())

def test_scalar_mul(self):
Expand Down
5 changes: 5 additions & 0 deletions scipy/special/tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from __future__ import division, print_function, absolute_import

import itertools
import platform

import numpy as np
from numpy import (array, isnan, r_, arange, finfo, pi, sin, cos, tan, exp,
Expand Down Expand Up @@ -2518,9 +2519,13 @@ def check_cephes_vs_amos(self, f1, f2, rtol=1e-11, atol=0, skip=None):
assert_allclose(c3, c2, err_msg=(v, z),
rtol=rtol, atol=atol)

@pytest.mark.xfail(platform.machine() == 'ppc64le',
reason="fails on ppc64le")
def test_jv_cephes_vs_amos(self):
self.check_cephes_vs_amos(special.jv, special.jn, rtol=1e-10, atol=1e-305)

@pytest.mark.xfail(platform.machine() == 'ppc64le',
reason="fails on ppc64le")
def test_yv_cephes_vs_amos(self):
self.check_cephes_vs_amos(special.yv, special.yn, rtol=1e-11, atol=1e-305)

Expand Down
9 changes: 7 additions & 2 deletions scipy/special/tests/test_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import division, print_function, absolute_import

import os
import platform

import numpy as np
from numpy import arccosh, arcsinh, arctanh
Expand Down Expand Up @@ -213,9 +214,13 @@ def clog1p(x, y):
data(assoc_legendre_p_boost_, 'assoc_legendre_p_ipp-assoc_legendre_p', (0,1,2), 3, rtol=1e-11),

data(legendre_p_via_assoc_, 'legendre_p_ipp-legendre_p', (0,1), 2, rtol=1e-11),
data(legendre_p_via_assoc_, 'legendre_p_large_ipp-legendre_p_large', (0,1), 2, rtol=7e-14),
pytest.param(data(legendre_p_via_assoc_, 'legendre_p_large_ipp-legendre_p_large', (0,1), 2, rtol=7e-14),
marks=pytest.mark.xfail(platform.machine() == 'ppc64le',
reason="fails on ppc64le")),
data(legendre_p_via_lpmn, 'legendre_p_ipp-legendre_p', (0,1), 2, rtol=5e-14, vectorized=False),
data(legendre_p_via_lpmn, 'legendre_p_large_ipp-legendre_p_large', (0,1), 2, rtol=7e-14, vectorized=False),
pytest.param(data(legendre_p_via_lpmn, 'legendre_p_large_ipp-legendre_p_large', (0,1), 2, rtol=7e-14, vectorized=False),
marks=pytest.mark.xfail(platform.machine() == 'ppc64le',
reason="fails on ppc64le")),
data(lpn_, 'legendre_p_ipp-legendre_p', (0,1), 2, rtol=5e-14, vectorized=False),
data(lpn_, 'legendre_p_large_ipp-legendre_p_large', (0,1), 2, rtol=3e-13, vectorized=False),
data(eval_legendre_ld, 'legendre_p_ipp-legendre_p', (0,1), 2, rtol=6e-14),
Expand Down
5 changes: 5 additions & 0 deletions scipy/special/tests/test_orthogonal.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from __future__ import division, print_function, absolute_import

import platform

import numpy as np
from numpy import array, sqrt
from numpy.testing import (assert_array_almost_equal, assert_equal,
assert_almost_equal, assert_allclose)
import pytest
from pytest import raises as assert_raises

from scipy._lib.six import xrange
Expand Down Expand Up @@ -712,6 +715,8 @@ def test_roots_laguerre():
assert_raises(ValueError, sc.roots_laguerre, 0)
assert_raises(ValueError, sc.roots_laguerre, 3.3)

@pytest.mark.xfail(platform.machine() == 'ppc64le',
reason="fails on ppc64le")
def test_roots_genlaguerre():
rootf = lambda a: lambda n, mu: sc.roots_genlaguerre(n, a, mu)
evalf = lambda a: lambda n, x: orth.eval_genlaguerre(n, a, x)
Expand Down
3 changes: 3 additions & 0 deletions scipy/stats/tests/test_mstats_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from __future__ import division, print_function, absolute_import

import warnings
import platform

import numpy as np
from numpy import nan
Expand Down Expand Up @@ -246,6 +247,8 @@ def test_spearmanr(self):
attributes = ('correlation', 'pvalue')
check_named_results(res, attributes, ma=True)

@pytest.mark.xfail(platform.machine() == 'ppc64le',
reason="fails on ppc64le")
def test_kendalltau(self):
# simple case without ties
x = ma.array(np.arange(10))
Expand Down