Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #15090 from rgommers/arm64-17x
Browse files Browse the repository at this point in the history
MAINT: skip a few failing tests in `1.7.x` for macOS arm64
  • Loading branch information
tylerjereddy committed Nov 24, 2021
2 parents 3f33531 + d75f647 commit 1b9e907
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions scipy/integrate/tests/test_banded_ode_solvers.py
@@ -1,8 +1,14 @@
import itertools
import sys
import platform

import pytest
import numpy as np
from numpy.testing import assert_allclose
from scipy.integrate import ode

IS_MACOS_ARM64 = sys.platform == 'darwin' and platform.machine() == 'arm64'


def _band_count(a):
"""Returns ml and mu, the lower and upper band sizes of a."""
Expand Down Expand Up @@ -124,6 +130,7 @@ def _analytical_solution(a, y0, t):
return sol


@pytest.mark.skipif(IS_MACOS_ARM64, reason='failing on arm64')
def test_banded_ode_solvers():
# Test the "lsoda", "vode" and "zvode" solvers of the `ode` class
# with a system that has a banded Jacobian matrix.
Expand Down
13 changes: 13 additions & 0 deletions scipy/integrate/tests/test_integrate.py
Expand Up @@ -2,16 +2,23 @@
"""
Tests for numerical integration.
"""
import sys
import platform

import numpy as np
from numpy import (arange, zeros, array, dot, sqrt, cos, sin, eye, pi, exp,
allclose)

from numpy.testing import (
assert_, assert_array_almost_equal,
assert_allclose, assert_array_equal, assert_equal, assert_warns)
import pytest
from pytest import raises as assert_raises
from scipy.integrate import odeint, ode, complex_ode

IS_MACOS_ARM64 = sys.platform == 'darwin' and platform.machine() == 'arm64'


#------------------------------------------------------------------------------
# Test ODE integrators
#------------------------------------------------------------------------------
Expand Down Expand Up @@ -99,6 +106,7 @@ def test_vode(self):
self._do_problem(problem, 'vode', 'adams')
self._do_problem(problem, 'vode', 'bdf')

@pytest.mark.skipif(IS_MACOS_ARM64, reason="zvode failing, see gh-15077")
def test_zvode(self):
# Check the zvode solver
for problem_cls in PROBLEMS:
Expand Down Expand Up @@ -154,6 +162,7 @@ def test_concurrent_fail(self):

assert_raises(RuntimeError, r.integrate, r.t + 0.1)

@pytest.mark.skipif(IS_MACOS_ARM64, reason="zvode failing, see gh-15077")
def test_concurrent_ok(self):
f = lambda t, y: 1.0

Expand Down Expand Up @@ -597,10 +606,12 @@ def _check_solver(self, solver):
solver.integrate(pi)
assert_array_almost_equal(solver.y, [-1.0, 0.0])

@pytest.mark.skipif(IS_MACOS_ARM64, reason="zvode failing, see gh-15077")
def test_no_params(self):
solver = self._get_solver(f, jac)
self._check_solver(solver)

@pytest.mark.skipif(IS_MACOS_ARM64, reason="zvode failing, see gh-15077")
def test_one_scalar_param(self):
solver = self._get_solver(f1, jac1)
omega = 1.0
Expand All @@ -609,6 +620,7 @@ def test_one_scalar_param(self):
solver.set_jac_params(omega)
self._check_solver(solver)

@pytest.mark.skipif(IS_MACOS_ARM64, reason="zvode failing, see gh-15077")
def test_two_scalar_params(self):
solver = self._get_solver(f2, jac2)
omega1 = 1.0
Expand All @@ -618,6 +630,7 @@ def test_two_scalar_params(self):
solver.set_jac_params(omega1, omega2)
self._check_solver(solver)

@pytest.mark.skipif(IS_MACOS_ARM64, reason="zvode failing, see gh-15077")
def test_vector_param(self):
solver = self._get_solver(fv, jacv)
omega = [1.0, 1.0]
Expand Down
5 changes: 5 additions & 0 deletions scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py
Expand Up @@ -6,6 +6,8 @@

import threading
import itertools
import sys
import platform

import numpy as np

Expand All @@ -23,6 +25,8 @@

from scipy._lib._gcutils import assert_deallocated, IS_PYPY

IS_MACOS_ARM64 = sys.platform == 'darwin' and platform.machine() == 'arm64'


# precision for tests
_ndigits = {'f': 3, 'd': 11, 'F': 3, 'D': 11}
Expand Down Expand Up @@ -497,6 +501,7 @@ def test_general_nonsymmetric_starting_vector():
eval_evec(symmetric, d, typ, k, "LM", v0, sigma)


@pytest.mark.skipif(IS_MACOS_ARM64, reason='failing on arm64')
def test_standard_nonsymmetric_no_convergence():
np.random.seed(1234)
m = generate_matrix(30, complex_=True)
Expand Down
1 change: 1 addition & 0 deletions scipy/special/tests/test_mpmath.py
Expand Up @@ -1419,6 +1419,7 @@ def test_jacobi(self):
exception_to_nan(lambda a, b, c, x: mpmath.jacobi(a, b, c, x, **HYPERKW)),
[IntArg(), Arg(), Arg(), Arg()])

@pytest.mark.xslow
def test_jacobi_int(self):
# Redefine functions to deal with numerical + mpmath issues
def jacobi(n, a, b, x):
Expand Down

0 comments on commit 1b9e907

Please sign in to comment.