Skip to content

Build failure: python313Packages.scipy #533557

Open

Description

@n0099

Nixpkgs version

  • Stable (26.05)

Steps to reproduce

Building python313Packages.scipy will fail on testing TestSTFT::test_roundtrip_scaling, TestDerivative::test_initial_step[numpy], TestLinprogIPDense::test_bug_6139 and TestLinprogIPSparsePresolve::test_bug_6139 when nixpkgs.hostPlatform.gcc.{arch,tune} is znver5.

Can Hydra reproduce this build failure?

Hydra doesn’t try to build the package.

Link to Hydra build job

No response

Relevant log output

=================================== FAILURES ===================================
_______________________ TestSTFT.test_roundtrip_scaling ________________________
[gw6] linux -- Python 3.13.13 /nix/store/f0vg9zspc33r171yzqln6lyxbb14mb17-python3-3.13.13/bin/python3.13

self = <scipy.signal.tests.test_spectral.TestSTFT object at 0x7fffb5359ff0>

    def test_roundtrip_scaling(self):
        """Verify behavior of scaling parameter. """
        # Create 1024 sample cosine signal with amplitude 2:
        X = np.zeros(513, dtype=complex)
        X[256] = 1024
        x = np.fft.irfft(X)
        power_x = sum(x**2) / len(x)  # power of signal x is 2
    
        # Calculate magnitude-scaled STFT:
        Zs = stft(x, boundary='even', scaling='spectrum')[2]
    
        # Test round trip:
        x1 = istft(Zs, boundary=True, scaling='spectrum')[1]
>       assert_allclose(x1, x)
E       AssertionError: 
E       Not equal to tolerance rtol=1e-07, atol=0
E       
E       Mismatched elements: 64 / 1024 (6.25%)
E       First 5 mismatches are at indices:
E        [897]: -4.963199601507357e-22 (ACTUAL), 0.0 (DESIRED)
E        [899]: -1.03154061130407e-20 (ACTUAL), 0.0 (DESIRED)
E        [901]: -2.930344625821113e-20 (ACTUAL), 0.0 (DESIRED)
E        [903]: -4.868299587202298e-20 (ACTUAL), 0.0 (DESIRED)
E        [905]: -9.098104213233174e-20 (ACTUAL), 0.0 (DESIRED)
E       Max absolute difference among violations: 4.00410733e-17
E       Max relative difference among violations: inf
E        ACTUAL: array([ 2.000000e+00,  0.000000e+00, -2.000000e+00, ..., -1.224710e-18,
E              -2.000000e+00,  5.439144e-19], shape=(1024,))
E        DESIRED: array([ 2.,  0., -2., ...,  0., -2.,  0.], shape=(1024,))

lib/python3.13/site-packages/scipy/signal/tests/test_spectral.py:2047: AssertionError
___________________ TestDerivative.test_initial_step[numpy] ____________________
[gw0] linux -- Python 3.13.13 /nix/store/f0vg9zspc33r171yzqln6lyxbb14mb17-python3-3.13.13/bin/python3.13

self = <scipy.differentiate.tests.test_differentiate.TestDerivative object at 0x7fffbea55400>
xp = <module 'scipy._lib.array_api_compat.numpy' from '/nix/store/q75x6v2zj8kfkbmbm0ld5vxqcq3kdh3s-python3.13-scipy-1.17.1/lib/python3.13/site-packages/scipy/_lib/array_api_compat/numpy/__init__.py'>

    def test_initial_step(self, xp):
        # Test that `initial_step` works as expected and is vectorized
        def f(x):
            return xp.exp(x)
    
        x = xp.asarray(0., dtype=xp.float64)
        step_direction = xp.asarray([-1, 0, 1])
        h0 = xp.reshape(xp.logspace(-3, 0, 10), (-1, 1))
        res = derivative(f, x, initial_step=h0, order=2, maxiter=1,
                         step_direction=step_direction)
        err = xp.abs(res.df - f(x))
    
        # error should be smaller for smaller step sizes
        assert xp.all(err[:-1, ...] < err[1:, ...])
    
        # results of vectorized call should match results with
        # initial_step taken one at a time
        for i in range(h0.shape[0]):
            ref = derivative(f, x, initial_step=h0[i, 0], order=2, maxiter=1,
                             step_direction=step_direction)
>           xp_assert_close(res.df[i, :], ref.df, rtol=1e-14)
E           AssertionError: 
E           Not equal to tolerance rtol=1e-14, atol=0
E           
E           Mismatched elements: 1 / 3 (33.3%)
E           Mismatch at index:
E            [2]: 0.9999994524803824 (ACTUAL), 0.99999945247997 (DESIRED)
E           Max absolute difference among violations: 4.12336831e-13
E           Max relative difference among violations: 4.12337057e-13
E            ACTUAL: array([0.999999, 1.000001, 0.999999])
E            DESIRED: array([0.999999, 1.000001, 0.999999])

lib/python3.13/site-packages/scipy/differentiate/tests/test_differentiate.py:258: AssertionError
______________________ TestLinprogIPSparse.test_bug_6139 _______________________
[gw1] linux -- Python 3.13.13 /nix/store/f0vg9zspc33r171yzqln6lyxbb14mb17-python3-3.13.13/bin/python3.13

self = <scipy.optimize.tests.test_linprog.TestLinprogIPSparse object at 0x7fffb8dd8cd0>

    @pytest.mark.skipif(
        sys.platform == 'darwin',
        reason="Fails on macOS x86 Accelerate builds (gh-20510)"
    )
    @pytest.mark.xfail_on_32bit("This test is sensitive to machine epsilon level "
                                "perturbations in linear system solution in "
                                "_linprog_ip._sym_solve.")
    def test_bug_6139(self):
>       super().test_bug_6139()

lib/python3.13/site-packages/scipy/optimize/tests/test_linprog.py:2091: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/python3.13/site-packages/scipy/optimize/tests/test_linprog.py:1371: in test_bug_6139
    _assert_success(res, desired_fun=14.95,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

res =  message: The solution does not satisfy the constraints within the required tolerance of 3.16E-04, yet no errors were ...port.
 success: False
  status: 4
     fun: 14.949999999740342
       x: [ 5.000e+00  4.950e+00  5.000e+00]
     nit: 5
desired_fun = 14.95, desired_x = array([5.  , 4.95, 5.  ]), rtol = 1e-08
atol = 1e-08

    def _assert_success(res, desired_fun=None, desired_x=None,
                        rtol=1e-8, atol=1e-8):
        # res: linprog result object
        # desired_fun: desired objective function value or None
        # desired_x: desired solution or None
        if not res.success:
            msg = f"linprog status {res.status}, message: {res.message}"
>           raise AssertionError(msg)
E           AssertionError: linprog status 4, message: The solution does not satisfy the constraints within the required tolerance of 3.16E-04, yet no errors were raised and there is no certificate of infeasibility or unboundedness. Check whether the slack and constraint residuals are acceptable; if not, consider enabling presolve, adjusting the tolerance option(s), and/or using a different method. Please consider submitting a bug report.

lib/python3.13/site-packages/scipy/optimize/tests/test_linprog.py:69: AssertionError
__________________ TestLinprogIPSparsePresolve.test_bug_6139 ___________________
[gw1] linux -- Python 3.13.13 /nix/store/f0vg9zspc33r171yzqln6lyxbb14mb17-python3-3.13.13/bin/python3.13

self = <scipy.optimize.tests.test_linprog.TestLinprogIPSparsePresolve object at 0x7fffb8dd8f50>

    @pytest.mark.skipif(
        sys.platform == 'darwin',
        reason="Fails on macOS x86 Accelerate builds (gh-20510)"
    )
    @pytest.mark.xfail_on_32bit("This test is sensitive to machine epsilon level "
                                "perturbations in linear system solution in "
                                "_linprog_ip._sym_solve.")
    def test_bug_6139(self):
>       super().test_bug_6139()

lib/python3.13/site-packages/scipy/optimize/tests/test_linprog.py:2151: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
lib/python3.13/site-packages/scipy/optimize/tests/test_linprog.py:1371: in test_bug_6139
    _assert_success(res, desired_fun=14.95,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

res =  message: The solution does not satisfy the constraints within the required tolerance of 3.16E-04, yet no errors were ...port.
 success: False
  status: 4
     fun: 14.949999999740342
       x: [ 5.000e+00  4.950e+00  5.000e+00]
     nit: 5
desired_fun = 14.95, desired_x = array([5.  , 4.95, 5.  ]), rtol = 1e-08
atol = 1e-08

    def _assert_success(res, desired_fun=None, desired_x=None,
                        rtol=1e-8, atol=1e-8):
        # res: linprog result object
        # desired_fun: desired objective function value or None
        # desired_x: desired solution or None
        if not res.success:
            msg = f"linprog status {res.status}, message: {res.message}"
>           raise AssertionError(msg)
E           AssertionError: linprog status 4, message: The solution does not satisfy the constraints within the required tolerance of 3.16E-04, yet no errors were raised and there is no certificate of infeasibility or unboundedness. Check whether the slack and constraint residuals are acceptable; if not, consider enabling presolve, adjusting the tolerance option(s), and/or using a different method. Please consider submitting a bug report.

lib/python3.13/site-packages/scipy/optimize/tests/test_linprog.py:69: AssertionError
=============================== warnings summary ===============================
lib/python3.13/site-packages/scipy/conftest.py:175
lib/python3.13/site-packages/scipy/conftest.py:175
lib/python3.13/site-packages/scipy/conftest.py:175
lib/python3.13/site-packages/scipy/conftest.py:175
lib/python3.13/site-packages/scipy/conftest.py:175
lib/python3.13/site-packages/scipy/conftest.py:175
lib/python3.13/site-packages/scipy/conftest.py:175
lib/python3.13/site-packages/scipy/conftest.py:175
  /nix/store/q75x6v2zj8kfkbmbm0ld5vxqcq3kdh3s-python3.13-scipy-1.17.1/lib/python3.13/site-packages/scipy/conftest.py:175: PytestUnknownMarkWarning: Unknown pytest.mark.array_api_backends - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    pytest.param(np, id='numpy', marks=pytest.mark.array_api_backends)

../f0vg9zspc33r171yzqln6lyxbb14mb17-python3-3.13.13/lib/python3.13/importlib/__init__.py:88
../f0vg9zspc33r171yzqln6lyxbb14mb17-python3-3.13.13/lib/python3.13/importlib/__init__.py:88
../f0vg9zspc33r171yzqln6lyxbb14mb17-python3-3.13.13/lib/python3.13/importlib/__init__.py:88
../f0vg9zspc33r171yzqln6lyxbb14mb17-python3-3.13.13/lib/python3.13/importlib/__init__.py:88
../f0vg9zspc33r171yzqln6lyxbb14mb17-python3-3.13.13/lib/python3.13/importlib/__init__.py:88
../f0vg9zspc33r171yzqln6lyxbb14mb17-python3-3.13.13/lib/python3.13/importlib/__init__.py:88
../f0vg9zspc33r171yzqln6lyxbb14mb17-python3-3.13.13/lib/python3.13/importlib/__init__.py:88
../f0vg9zspc33r171yzqln6lyxbb14mb17-python3-3.13.13/lib/python3.13/importlib/__init__.py:88
  /nix/store/f0vg9zspc33r171yzqln6lyxbb14mb17-python3-3.13.13/lib/python3.13/importlib/__init__.py:88: DeprecationWarning: `scipy.odr` is deprecated as of version 1.17.0 and will be removed in SciPy 1.19.0. Please use `https://pypi.org/project/odrpack/` instead.
    return _bootstrap._gcd_import(name[level:], package, level)

lib/python3.13/site-packages/scipy/signal/tests/test_bsplines.py:340
lib/python3.13/site-packages/scipy/signal/tests/test_bsplines.py:340
lib/python3.13/site-packages/scipy/signal/tests/test_bsplines.py:340
lib/python3.13/site-packages/scipy/signal/tests/test_bsplines.py:340
lib/python3.13/site-packages/scipy/signal/tests/test_bsplines.py:340
lib/python3.13/site-packages/scipy/signal/tests/test_bsplines.py:340
lib/python3.13/site-packages/scipy/signal/tests/test_bsplines.py:340
lib/python3.13/site-packages/scipy/signal/tests/test_bsplines.py:340
  /nix/store/q75x6v2zj8kfkbmbm0ld5vxqcq3kdh3s-python3.13-scipy-1.17.1/lib/python3.13/site-packages/scipy/signal/tests/test_bsplines.py:340: PytestUnknownMarkWarning: Unknown pytest.mark.fail_asan - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
    @pytest.mark.fail_asan

lib/python3.13/site-packages/scipy/stats/tests/test_axis_nan_policy.py: 102 warnings
  /nix/store/dm9g04cgfmx8rrp6x9bhqmdrigshaclj-python3.13-numpy-2.4.4/lib/python3.13/site-packages/numpy/_core/fromnumeric.py:3824: RuntimeWarning: Mean of empty slice
    return _methods._mean(a, axis=axis, dtype=dtype,

lib/python3.13/site-packages/scipy/stats/tests/test_axis_nan_policy.py: 79 warnings
  /nix/store/q75x6v2zj8kfkbmbm0ld5vxqcq3kdh3s-python3.13-scipy-1.17.1/lib/python3.13/site-packages/scipy/stats/_stats_py.py:10654: SmallSampleWarning: One or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.
    return gmean(x, weights=weights, axis=axis, keepdims=keepdims)

lib/python3.13/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-boxcox_llf-args83-kwds83-1-1-False-<lambda>]
lib/python3.13/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-boxcox_llf-args83-kwds83-1-1-False-<lambda>]
lib/python3.13/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-boxcox_llf-args83-kwds83-1-1-False-<lambda>]
  /nix/store/q75x6v2zj8kfkbmbm0ld5vxqcq3kdh3s-python3.13-scipy-1.17.1/lib/python3.13/site-packages/scipy/stats/tests/test_axis_nan_policy.py:77: SmallSampleWarning: One or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.
    return stats._morestats._boxcox_llf(data, lmb=lmb, axis=axis)

lib/python3.13/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-yeojohnson_llf-args84-kwds84-1-1-False-<lambda>]
lib/python3.13/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-yeojohnson_llf-args84-kwds84-1-1-False-<lambda>]
lib/python3.13/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-yeojohnson_llf-args84-kwds84-1-1-False-<lambda>]
  /nix/store/q75x6v2zj8kfkbmbm0ld5vxqcq3kdh3s-python3.13-scipy-1.17.1/lib/python3.13/site-packages/scipy/stats/tests/test_axis_nan_policy.py:83: SmallSampleWarning: One or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.
    return stats._morestats._yeojohnson_llf(data, lmb=lmb, axis=axis)

lib/python3.13/site-packages/scipy/stats/tests/test_qmc.py::TestUtils::test_geometric_discrepancy_mst_with_zero_distances
  /nix/store/q75x6v2zj8kfkbmbm0ld5vxqcq3kdh3s-python3.13-scipy-1.17.1/lib/python3.13/site-packages/scipy/stats/tests/test_qmc.py:234: UserWarning: Sample contains duplicate points.
    assert_allclose(qmc.geometric_discrepancy(sample, method='mst'), 0.5)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED lib/python3.13/site-packages/scipy/signal/tests/test_spectral.py::TestSTFT::test_roundtrip_scaling - AssertionError: 
Not equal to tolerance rtol=1e-07, atol=0

Mismatched elements: 64 / 1024 (6.25%)
First 5 mismatches are at indices:
 [897]: -4.963199601507357e-22 (ACTUAL), 0.0 (DESIRED)
 [899]: -1.03154061130407e-20 (ACTUAL), 0.0 (DESIRED)
 [901]: -2.930344625821113e-20 (ACTUAL), 0.0 (DESIRED)
 [903]: -4.868299587202298e-20 (ACTUAL), 0.0 (DESIRED)
 [905]: -9.098104213233174e-20 (ACTUAL), 0.0 (DESIRED)
Max absolute difference among violations: 4.00410733e-17
Max relative difference among violations: inf
 ACTUAL: array([ 2.000000e+00,  0.000000e+00, -2.000000e+00, ..., -1.224710e-18,
       -2.000000e+00,  5.439144e-19], shape=(1024,))
 DESIRED: array([ 2.,  0., -2., ...,  0., -2.,  0.], shape=(1024,))
FAILED lib/python3.13/site-packages/scipy/differentiate/tests/test_differentiate.py::TestDerivative::test_initial_step[numpy] - AssertionError: 
Not equal to tolerance rtol=1e-14, atol=0

Mismatched elements: 1 / 3 (33.3%)
Mismatch at index:
 [2]: 0.9999994524803824 (ACTUAL), 0.99999945247997 (DESIRED)
Max absolute difference among violations: 4.12336831e-13
Max relative difference among violations: 4.12337057e-13
 ACTUAL: array([0.999999, 1.000001, 0.999999])
 DESIRED: array([0.999999, 1.000001, 0.999999])
FAILED lib/python3.13/site-packages/scipy/optimize/tests/test_linprog.py::TestLinprogIPSparse::test_bug_6139 - AssertionError: linprog status 4, message: The solution does not satisfy the constraints within the required tolerance of 3.16E-04, yet no errors were raised and there is no certificate of infeasibility or unboundedness. Check whether the slack and constraint residuals are acceptable; if not, consider enabling presolve, adjusting the tolerance option(s), and/or using a different method. Please consider submitting a bug report.
FAILED lib/python3.13/site-packages/scipy/optimize/tests/test_linprog.py::TestLinprogIPSparsePresolve::test_bug_6139 - AssertionError: linprog status 4, message: The solution does not satisfy the constraints within the required tolerance of 3.16E-04, yet no errors were raised and there is no certificate of infeasibility or unboundedness. Check whether the slack and constraint residuals are acceptable; if not, consider enabling presolve, adjusting the tolerance option(s), and/or using a different method. Please consider submitting a bug report.
= 4 failed, 81210 passed, 7688 skipped, 300 xfailed, 23 xpassed, 212 warnings in 230.09s (0:03:50) =

Additional context

https://docs.amd.com/r/en-US/63985-python-libraries-with-aocl-user-guide/Known-Issues

  1. On SciPy, a precision difference has been observed for optimize/tests/test_linprog.py::TestLinprogIPSparse::test_bug_6139. When using our wheel, this test is expected to fail.
  2. On Scipy, TestLinprogIPSparsePresolve::test_bug_6139. When using our wheel, this test is expected to fail due to accuracy differences.
  3. On SciPy 1.15.1, differentiate/tests/test_differentiate.py::TestDerivative::test_initial_step[numpy]. When using our wheel, this test is expected to fail due to accuracy differences.

There have other failing reports on these tests across github:
TestDerivative::test_initial_step[numpy]: easybuilders/easybuild-easyconfigs#24464
TestLinprogIPDense::test_bug_6139: scipy/scipy#20216 scipy/scipy#16376 (comment)
TestLinprogIPSparsePresolve::test_bug_6139: scipy/scipy#13409 (comment) scipy/scipy#13364 (comment) sagemath/sage#34658 (comment) EESSI/software-layer#318 (comment) EESSI/software-layer#1187 (comment) easybuilders/easybuild-easyconfigs#23023 (comment)

System metadata

  • system: "x86_64-linux"
  • host os: Linux 6.18.35-cachyos-lto, NixOS, 26.05 (Yarara), 26.05.20260611.a037402
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Determinate Nix 3.21.1) 2.34.7
  • nixpkgs: /nix/store/9figz32vbiblaw5x3li1hc8q9qwlwf27-source

Notify maintainers

@doronbehar


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Activity

  1. added
    0.kind: build failure
    on Jun 20, 2026
  2. doronbehar commented on Jun 21, 2026

    @doronbehar
    Contributor

    Hey thanks for the report. Scipy in Nixpkgs goes through an update in #533691 , so maybe you'd like to check it when that PR reaches branch master. Independently of that, you should be able to open a PR against branch master (that will have 0 rebuilds) that will add these tests to the disabledTests list, with proper links to upstream and AMD websites.

  3. n0099 commented on Jun 23, 2026

    @n0099
    ContributorAuthor

    I'm building on commit edf9568 of #533691 with

    let
      nixpkgs = import ./default.nix {
        localSystem = {
          gcc = rec {
            arch = "znver5";
            tune = arch;
          };
          system = "x86_64-linux";
        };
      };
    in
    nixpkgs.pkgs.python3Packages.scipy

    Also when building this PR with skylake, 3 tests TestMinimumPhase::test_nyquist[numpy-float32-963], TestSTFT::test_roundtrip_float32 and TestSTFT::test_roundtrip_scaling will fail:

    /nix/store/x8cijhzkxpkam8fdxs3xz61yph7sd967-python3.14-pytest-9.0.3/lib/python3.14/site-packages/_pytest/unraisableexception.py:67: PytestUnraisableExceptionWarning: Exception ignored while calling GC callback <function gc_cumulative_time.<locals>.gc_callback at 0x7fffa3b14ca0>: None
    
    Traceback (most recent call last):
      File "/nix/store/3gaz26b5i39p8mqcg4dd5fphi1vxnj9v-python3.14-hypothesis-6.151.10/lib/python3.14/site-packages/hypothesis/internal/conjecture/junkdrawer.py", line 468, in gc_callback
        now = _perf_counter()
    KeyboardInterrupt
    
    
      warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))
    
    =================================== FAILURES ===================================
    _______________ TestMinimumPhase.test_nyquist[numpy-float32-963] _______________
    [gw1] linux -- Python 3.14.6 /nix/store/527qzp063scbapb8561f889hmn5mpmn8-python3-3.14.6/bin/python3.14
    
    self = <scipy.signal.tests.test_fir_filter_design.TestMinimumPhase object at 0x7fffb62dd6e0>
    N = 963, dtype = 'float32'
    xp = <module 'scipy._external.array_api_compat.numpy' from '/nix/store/1448aa2jhlzz4nydp3jihc7q10gba7zh-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/_external/array_api_compat/numpy/__init__.py'>
    
        @xfail_xp_backends("cupy", reason="cupy/cupy#9795")
        @pytest.mark.parametrize("N", (963, 964))
        @pytest.mark.parametrize("dtype", ("float32", "float64"))
        def test_nyquist(self, N, dtype, xp):
            fc = xp.asarray(10)
            fs = 100
            h = firwin(N, fc, window="hann", pass_zero="lowpass", scale=False, fs=fs)
            xp_dtype = getattr(xp, dtype)
            h = xp.astype(h, xp_dtype)
            h_min_sig = minimum_phase(h, method="homomorphic", n_fft=N, half=False)
            H_mag = xp.abs(rfft(h, N))
            H_min_mag = xp.abs(rfft(h_min_sig, N))
            error = H_mag - H_min_mag
            atol = dict(float32=1e-5, float64=1e-13)[dtype]
    >       xp_assert_close(error, xp.zeros_like(error), atol=atol)
    E       AssertionError: 
    E       Not equal to tolerance rtol=0.00138107, atol=1e-05
    E       
    E       Mismatched elements: 1 / 482 (0.207%)
    E       Mismatch at index:
    E        [0]: 1.1444091796875e-05 (ACTUAL), 0.0 (DESIRED)
    E       Max absolute difference among violations: 1.1444092e-05
    E       Max relative difference among violations: inf
    E        ACTUAL: array([ 1.144409e-05,  5.424023e-06, -2.026558e-06, -1.013279e-06,
    E               2.801418e-06,  4.470348e-06,  2.861023e-06, -3.874302e-06,
    E               2.086163e-06, -1.788139e-07,  1.132488e-06, -1.788139e-07,...
    E        DESIRED: array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
    E              0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
    E              0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,...
    
    lib/python3.14/site-packages/scipy/signal/tests/test_fir_filter_design.py:779: AssertionError
    _______________________ TestSTFT.test_roundtrip_float32 ________________________
    [gw2] linux -- Python 3.14.6 /nix/store/527qzp063scbapb8561f889hmn5mpmn8-python3-3.14.6/bin/python3.14
    
    self = <scipy.signal.tests.test_spectral.TestSTFT object at 0x7fffb677e300>
    
        def test_roundtrip_float32(self):
            rng = np.random.RandomState(1234)
        
            settings = [('hann', 1024, 256, 128)]
        
            for window, N, nperseg, noverlap in settings:
                t = np.arange(N)
                x = 10*rng.randn(t.size)
                x = x.astype(np.float32)
        
                _, _, zz = stft(x, nperseg=nperseg, noverlap=noverlap,
                                window=window, detrend=None, padded=False)
        
    >           tr, xr = istft(zz, nperseg=nperseg, noverlap=noverlap,
                               window=window)
    
    lib/python3.14/site-packages/scipy/signal/tests/test_spectral.py:1863: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    Zxx = array([[ 0.23852211+0.j        ,  0.11848764+0.j        ,
             1.0724121 +0.j        , ...,  0.25270203+0.j       ...8294464+0.j        ,
             0.50430596+0.j        ,  1.2144408 +0.j        ]],
          shape=(129, 9), dtype=complex64)
    fs = 1.0, window = 'hann', nperseg = 256, noverlap = 128, nfft = None
    input_onesided = True, boundary = True, time_axis = -1, freq_axis = -2
    scaling = 'spectrum'
    
        def istft_compare(Zxx, fs=1.0, window='hann', nperseg=None, noverlap=None,
                          nfft=None, input_onesided=True, boundary=True, time_axis=-1,
                          freq_axis=-2, scaling='spectrum'):
            """Assert that the results from the existing `istft()` and
            `_istft_wrapper()` are close to each other.
        
            Quirks:
            * If ``boundary=False`` the comparison is skipped, since it does not
              make sense with ShortTimeFFT.istft(). Only used in test
              TestSTFT.test_roundtrip_boundary_extension().
            * If ShortTimeFFT.istft() decides the STFT is not invertible, the
              comparison is skipped, since istft() only emits a warning and does not
              return a correct result. Only used in
              ShortTimeFFT.test_roundtrip_not_nola().
            * For comparing the signals an absolute tolerance of the floating point
              resolution was added to account for the low accuracy of float32 (Occurs
              only in TestSTFT.test_roundtrip_float32()).
            """
            kw = dict(Zxx=Zxx, fs=fs, window=window, nperseg=nperseg,
                      noverlap=noverlap, nfft=nfft, input_onesided=input_onesided,
                      boundary=boundary, time_axis=time_axis, freq_axis=freq_axis,
                      scaling=scaling)
        
            t, x = istft(**kw)
            if not boundary:  # skip test_roundtrip_boundary_extension():
                return t, x  # _istft_wrapper does() not implement this case
            try:  # if inversion fails, istft() only emits a warning:
                t_wrapper, x_wrapper, (k_lo, k_hi) = _istft_wrapper(**kw)
            except ValueError as v:  # Do nothing if inversion fails:
                if v.args[0] == "Short-time Fourier Transform not invertible!":
                    return t, x
                raise v
        
            e_msg_part = " of `istft_wrapper()` differ from `istft()`"
            assert_allclose(t, t_wrapper, err_msg=f"Sample times {e_msg_part}")
        
            # Adapted tolerances to account for resolution loss:
            atol = np.finfo(x.dtype).resolution*2  # instead of default atol = 0
            rtol = 1e-7  # default for np.allclose()
        
            # Relax atol on 32-Bit platforms a bit to pass CI tests.
            #  - Not clear why there are discrepancies (in the FFT maybe?)
            #  - Not sure what changed on 'i686' since earlier on those test passed
            if x.dtype == np.float32 and platform.machine() == 'i686':
                # float32 gets only used by TestSTFT.test_roundtrip_float32() so
                # we are using the tolerances from there to circumvent CI problems
                atol, rtol = 1e-4, 1e-5
            else:
                atol = max(atol, 1e-12)  # 2e-15 seems too tight
        
    >       assert_allclose(x_wrapper[k_lo:k_hi], x[k_lo:k_hi], atol=atol, rtol=rtol,
                            err_msg=f"Signal values {e_msg_part}")
    E       AssertionError: 
    E       Not equal to tolerance rtol=1e-07, atol=2e-06
    E       Signal values  of `istft_wrapper()` differ from `istft()`
    E       Mismatched elements: 1 / 767 (0.13%)
    E       Mismatch at index:
    E        [228]: 20.97800563264607 (ACTUAL), 20.978010177612305 (DESIRED)
    E       Max absolute difference among violations: 4.54496623e-06
    E       Max relative difference among violations: 2.16653829e-07
    E        ACTUAL: array([ 6.786297e+00,  2.395560e+00,  1.512266e+00,  8.161272e+00,
    E               1.893534e+01,  6.396327e+00, -9.620287e+00, -2.085266e+01,
    E               1.930247e+01, -1.735349e+01,  1.210384e+01,  7.974354e+00,...
    E        DESIRED: array([ 6.786298e+00,  2.395559e+00,  1.512267e+00,  8.161272e+00,
    E               1.893534e+01,  6.396327e+00, -9.620288e+00, -2.085266e+01,
    E               1.930247e+01, -1.735349e+01,  1.210384e+01,  7.974354e+00,...
    
    lib/python3.14/site-packages/scipy/signal/tests/_scipy_spectral_test_shim.py:309: AssertionError
    _______________________ TestSTFT.test_roundtrip_scaling ________________________
    [gw2] linux -- Python 3.14.6 /nix/store/527qzp063scbapb8561f889hmn5mpmn8-python3-3.14.6/bin/python3.14
    
    self = <scipy.signal.tests.test_spectral.TestSTFT object at 0x7fffb45803c0>
    
        def test_roundtrip_scaling(self):
            """Verify behavior of scaling parameter. """
            # Create 1024 sample cosine signal with amplitude 2:
            X = np.zeros(513, dtype=complex)
            X[256] = 1024
            x = np.fft.irfft(X)
            power_x = sum(x**2) / len(x)  # power of signal x is 2
        
            # Calculate magnitude-scaled STFT:
            Zs = stft(x, boundary='even', scaling='spectrum')[2]
        
            # Test round trip:
            x1 = istft(Zs, boundary=True, scaling='spectrum')[1]
    >       assert_allclose(x1, x)
    E       AssertionError: 
    E       Not equal to tolerance rtol=1e-07, atol=0
    E       
    E       Mismatched elements: 64 / 1024 (6.25%)
    E       First 5 mismatches are at indices:
    E        [897]: -4.963199601507357e-22 (ACTUAL), 0.0 (DESIRED)
    E        [899]: -1.03154061130407e-20 (ACTUAL), 0.0 (DESIRED)
    E        [901]: -2.930344625821113e-20 (ACTUAL), 0.0 (DESIRED)
    E        [903]: -4.868299587202298e-20 (ACTUAL), 0.0 (DESIRED)
    E        [905]: -9.098104213233174e-20 (ACTUAL), 0.0 (DESIRED)
    E       Max absolute difference among violations: 4.00410733e-17
    E       Max relative difference among violations: inf
    E        ACTUAL: array([ 2.000000e+00,  0.000000e+00, -2.000000e+00, ..., -1.224710e-18,
    E              -2.000000e+00,  5.439144e-19], shape=(1024,))
    E        DESIRED: array([ 2.,  0., -2., ...,  0., -2.,  0.], shape=(1024,))
    
    lib/python3.14/site-packages/scipy/signal/tests/test_spectral.py:2047: AssertionError
    =============================== warnings summary ===============================
    lib/python3.14/site-packages/scipy/conftest.py:181
    lib/python3.14/site-packages/scipy/conftest.py:181
    lib/python3.14/site-packages/scipy/conftest.py:181
    lib/python3.14/site-packages/scipy/conftest.py:181
    lib/python3.14/site-packages/scipy/conftest.py:181
    lib/python3.14/site-packages/scipy/conftest.py:181
    lib/python3.14/site-packages/scipy/conftest.py:181
    lib/python3.14/site-packages/scipy/conftest.py:181
      /nix/store/1448aa2jhlzz4nydp3jihc7q10gba7zh-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/conftest.py:181: PytestUnknownMarkWarning: Unknown pytest.mark.array_api_backends - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        pytest.param(np, id='numpy', marks=pytest.mark.array_api_backends)
    
    ../527qzp063scbapb8561f889hmn5mpmn8-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
    ../527qzp063scbapb8561f889hmn5mpmn8-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
    ../527qzp063scbapb8561f889hmn5mpmn8-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
    ../527qzp063scbapb8561f889hmn5mpmn8-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
    ../527qzp063scbapb8561f889hmn5mpmn8-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
    ../527qzp063scbapb8561f889hmn5mpmn8-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
    ../527qzp063scbapb8561f889hmn5mpmn8-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
    ../527qzp063scbapb8561f889hmn5mpmn8-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
      /nix/store/527qzp063scbapb8561f889hmn5mpmn8-python3-3.14.6/lib/python3.14/importlib/__init__.py:88: DeprecationWarning: `scipy.odr` is deprecated as of version 1.17.0 and will be removed in SciPy 1.19.0. Please use `https://pypi.org/project/odrpack/` instead.
        return _bootstrap._gcd_import(name[level:], package, level)
    
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
      /nix/store/1448aa2jhlzz4nydp3jihc7q10gba7zh-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341: PytestUnknownMarkWarning: Unknown pytest.mark.fail_asan - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.fail_asan
    
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
      /nix/store/1448aa2jhlzz4nydp3jihc7q10gba7zh-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117: PytestUnknownMarkWarning: Unknown pytest.mark.fail_asan - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.fail_asan
    
    lib/python3.14/site-packages/scipy/sparse/linalg/_isolve/tests/test_iterative.py::test_maxiter_worsening[gmres-numpy]
    lib/python3.14/site-packages/scipy/sparse/linalg/_isolve/tests/test_iterative.py::test_maxiter_worsening[qmr-numpy]
      /nix/store/1448aa2jhlzz4nydp3jihc7q10gba7zh-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/_external/array_api_compat/numpy/_aliases.py:94: ComplexWarning: Casting complex values to real discards the imaginary part
        return np.array(obj, copy=copy, dtype=dtype, **kwargs)
    
    lib/python3.14/site-packages/scipy/sparse/tests/test_64bit.py: 135 warnings
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py: 66 warnings
      /nix/store/g92k22x09hip60vkj661aygk8y5miw3d-python3.14-numpy-2.5.0/lib/python3.14/site-packages/numpy/_core/_methods.py:49: ComplexWarning: Casting complex values to real discards the imaginary part
        return umr_sum(a, axis, dtype, out, keepdims, initial, where)
    
    lib/python3.14/site-packages/scipy/sparse/tests/test_64bit.py: 27 warnings
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py: 6 warnings
      /nix/store/1448aa2jhlzz4nydp3jihc7q10gba7zh-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/sparse/_dia.py:164: ComplexWarning: Casting complex values to real discards the imaginary part
        self.data.astype(res_dtype), one, row_sums)
    
    lib/python3.14/site-packages/scipy/sparse/tests/test_64bit.py: 108 warnings
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py: 54 warnings
      /nix/store/1448aa2jhlzz4nydp3jihc7q10gba7zh-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/sparse/_data.py:73: ComplexWarning: Casting complex values to real discards the imaginary part
        self.data.astype(dtype, casting=casting, copy=True),
    
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py::TestDOK::test_sum_dtype_pair_of_dtypes
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py::TestDOK::test_sum_dtype_pair_of_dtypes
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py::TestDOK::test_sum_dtype_pair_of_dtypes
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py::TestDOKMatrix::test_sum_dtype_pair_of_dtypes
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py::TestDOKMatrix::test_sum_dtype_pair_of_dtypes
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py::TestDOKMatrix::test_sum_dtype_pair_of_dtypes
      /nix/store/1448aa2jhlzz4nydp3jihc7q10gba7zh-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/sparse/_dok.py:628: ComplexWarning: Casting complex values to real discards the imaginary part
        data = np.array(list(self._dict.values()), dtype=dtype)
    
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py: 79 warnings
      /nix/store/1448aa2jhlzz4nydp3jihc7q10gba7zh-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/stats/_stats_py.py:11063: SmallSampleWarning: One or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.
        return gmean(x, weights=weights, axis=axis, keepdims=keepdims)
    
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py: 160 warnings
      /nix/store/g92k22x09hip60vkj661aygk8y5miw3d-python3.14-numpy-2.5.0/lib/python3.14/site-packages/numpy/_core/fromnumeric.py:3862: RuntimeWarning: Mean of empty slice
        return _methods._mean(a, axis=axis, dtype=dtype,
    
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-boxcox_llf-args86-kwds86-1-1-False-<lambda>]
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-boxcox_llf-args86-kwds86-1-1-False-<lambda>]
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-boxcox_llf-args86-kwds86-1-1-False-<lambda>]
      /nix/store/1448aa2jhlzz4nydp3jihc7q10gba7zh-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py:89: SmallSampleWarning: One or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.
        return stats._morestats._boxcox_llf(data, lmb=lmb, axis=axis)
    
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-yeojohnson_llf-args87-kwds87-1-1-False-<lambda>]
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-yeojohnson_llf-args87-kwds87-1-1-False-<lambda>]
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-yeojohnson_llf-args87-kwds87-1-1-False-<lambda>]
      /nix/store/1448aa2jhlzz4nydp3jihc7q10gba7zh-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py:95: SmallSampleWarning: One or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.
        return stats._morestats._yeojohnson_llf(data, lmb=lmb, axis=axis)
    
    lib/python3.14/site-packages/scipy/stats/tests/test_qmc.py::TestUtils::test_geometric_discrepancy_mst_with_zero_distances
      /nix/store/1448aa2jhlzz4nydp3jihc7q10gba7zh-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/stats/tests/test_qmc.py:234: UserWarning: Sample contains duplicate points.
        assert_allclose(qmc.geometric_discrepancy(sample, method='mst'), 0.5)
    
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    =========================== short test summary info ============================
    FAILED lib/python3.14/site-packages/scipy/signal/tests/test_fir_filter_design.py::TestMinimumPhase::test_nyquist[numpy-float32-963] - AssertionError: 
    Not equal to tolerance rtol=0.00138107, atol=1e-05
    
    Mismatched elements: 1 / 482 (0.207%)
    Mismatch at index:
     [0]: 1.1444091796875e-05 (ACTUAL), 0.0 (DESIRED)
    Max absolute difference among violations: 1.1444092e-05
    Max relative difference among violations: inf
     ACTUAL: array([ 1.144409e-05,  5.424023e-06, -2.026558e-06, -1.013279e-06,
            2.801418e-06,  4.470348e-06,  2.861023e-06, -3.874302e-06,
            2.086163e-06, -1.788139e-07,  1.132488e-06, -1.788139e-07,...
     DESIRED: array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
           0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
           0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,...
    FAILED lib/python3.14/site-packages/scipy/signal/tests/test_spectral.py::TestSTFT::test_roundtrip_float32 - AssertionError: 
    Not equal to tolerance rtol=1e-07, atol=2e-06
    Signal values  of `istft_wrapper()` differ from `istft()`
    Mismatched elements: 1 / 767 (0.13%)
    Mismatch at index:
     [228]: 20.97800563264607 (ACTUAL), 20.978010177612305 (DESIRED)
    Max absolute difference among violations: 4.54496623e-06
    Max relative difference among violations: 2.16653829e-07
     ACTUAL: array([ 6.786297e+00,  2.395560e+00,  1.512266e+00,  8.161272e+00,
            1.893534e+01,  6.396327e+00, -9.620287e+00, -2.085266e+01,
            1.930247e+01, -1.735349e+01,  1.210384e+01,  7.974354e+00,...
     DESIRED: array([ 6.786298e+00,  2.395559e+00,  1.512267e+00,  8.161272e+00,
            1.893534e+01,  6.396327e+00, -9.620288e+00, -2.085266e+01,
            1.930247e+01, -1.735349e+01,  1.210384e+01,  7.974354e+00,...
    FAILED lib/python3.14/site-packages/scipy/signal/tests/test_spectral.py::TestSTFT::test_roundtrip_scaling - AssertionError: 
    Not equal to tolerance rtol=1e-07, atol=0
    
    Mismatched elements: 64 / 1024 (6.25%)
    First 5 mismatches are at indices:
     [897]: -4.963199601507357e-22 (ACTUAL), 0.0 (DESIRED)
     [899]: -1.03154061130407e-20 (ACTUAL), 0.0 (DESIRED)
     [901]: -2.930344625821113e-20 (ACTUAL), 0.0 (DESIRED)
     [903]: -4.868299587202298e-20 (ACTUAL), 0.0 (DESIRED)
     [905]: -9.098104213233174e-20 (ACTUAL), 0.0 (DESIRED)
    Max absolute difference among violations: 4.00410733e-17
    Max relative difference among violations: inf
     ACTUAL: array([ 2.000000e+00,  0.000000e+00, -2.000000e+00, ..., -1.224710e-18,
           -2.000000e+00,  5.439144e-19], shape=(1024,))
     DESIRED: array([ 2.,  0., -2., ...,  0., -2.,  0.], shape=(1024,))
    = 3 failed, 87714 passed, 8354 skipped, 300 xfailed, 22 xpassed, 682 warnings in 243.54s (0:04:03) =
    
  4. doronbehar commented on Jun 24, 2026

    @doronbehar
    Contributor

    Also when building this PR with skylake

    What is skylake?

    3 tests will fail

    I am pretty sure scipy would love to hear about these failures in their issue tracker. As I said, feel free to add a lib.optionals addition to our disabledTests or disabledTestPaths depending on these stdenv.hostPlatform details. Please also link to an upstream issue when you do that.

  5. n0099 commented on Jun 24, 2026

    @n0099
    ContributorAuthor

    What is skylake?

    gcc.m{arch,tune} = "skylake";

    https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#index-march-13

    • ‘skylake’
      Intel Skylake CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, CX16, SAHF, FXSR, AVX, XSAVE, PCLMUL, FSGSBASE, RDRND, F16C, AVX2, BMI, BMI2, LZCNT, FMA, MOVBE, HLE, RDSEED, ADCX, PREFETCHW, AES, CLFLUSHOPT, XSAVEC, XSAVES and SGX instruction set support.
  6. n0099 commented on Jun 24, 2026

    @n0099
    ContributorAuthor

    I'm building on commit edf9568 of #533691 with

    with m{arch,tune}=znver5, test TestLinprogIPSparse::test_bug_6139, TestLinprogIPSparsePresolve::test_bug_6139, TestMinimumPhase::test_nyquist[numpy-float32-963], TestSTFT::test_roundtrip_float32 and TestSTFT::test_roundtrip_scaling will fail:

    =================================== FAILURES ===================================
    ______________________ TestLinprogIPSparse.test_bug_6139 _______________________
    [gw7] linux -- Python 3.14.6 /nix/store/yqlimndg72hqfcfkpsrcs6lxraw7mnd1-python3-3.14.6/bin/python3.14
    
    self = <scipy.optimize.tests.test_linprog.TestLinprogIPSparse object at 0x7fffb79b11d0>
    
        @pytest.mark.skipif(
            sys.platform == 'darwin',
            reason="Fails on macOS x86 Accelerate builds (gh-20510)"
        )
        @pytest.mark.xfail_on_32bit("This test is sensitive to machine epsilon level "
                                    "perturbations in linear system solution in "
                                    "_linprog_ip._sym_solve.")
        def test_bug_6139(self):
    >       super().test_bug_6139()
    
    lib/python3.14/site-packages/scipy/optimize/tests/test_linprog.py:2091: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    lib/python3.14/site-packages/scipy/optimize/tests/test_linprog.py:1371: in test_bug_6139
        _assert_success(res, desired_fun=14.95,
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    res =  message: The solution does not satisfy the constraints within the required tolerance of 3.16E-04, yet no errors were ...port.
     success: False
      status: 4
         fun: 14.949999999740342
           x: [ 5.000e+00  4.950e+00  5.000e+00]
         nit: 5
    desired_fun = 14.95, desired_x = array([5.  , 4.95, 5.  ]), rtol = 1e-08
    atol = 1e-08
    
        def _assert_success(res, desired_fun=None, desired_x=None,
                            rtol=1e-8, atol=1e-8):
            # res: linprog result object
            # desired_fun: desired objective function value or None
            # desired_x: desired solution or None
            if not res.success:
                msg = f"linprog status {res.status}, message: {res.message}"
    >           raise AssertionError(msg)
    E           AssertionError: linprog status 4, message: The solution does not satisfy the constraints within the required tolerance of 3.16E-04, yet no errors were raised and there is no certificate of infeasibility or unboundedness. Check whether the slack and constraint residuals are acceptable; if not, consider enabling presolve, adjusting the tolerance option(s), and/or using a different method. Please consider submitting a bug report.
    
    lib/python3.14/site-packages/scipy/optimize/tests/test_linprog.py:69: AssertionError
    __________________ TestLinprogIPSparsePresolve.test_bug_6139 ___________________
    [gw7] linux -- Python 3.14.6 /nix/store/yqlimndg72hqfcfkpsrcs6lxraw7mnd1-python3-3.14.6/bin/python3.14
    
    self = <scipy.optimize.tests.test_linprog.TestLinprogIPSparsePresolve object at 0x7fffb79b1450>
    
        @pytest.mark.skipif(
            sys.platform == 'darwin',
            reason="Fails on macOS x86 Accelerate builds (gh-20510)"
        )
        @pytest.mark.xfail_on_32bit("This test is sensitive to machine epsilon level "
                                    "perturbations in linear system solution in "
                                    "_linprog_ip._sym_solve.")
        def test_bug_6139(self):
    >       super().test_bug_6139()
    
    lib/python3.14/site-packages/scipy/optimize/tests/test_linprog.py:2151: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    lib/python3.14/site-packages/scipy/optimize/tests/test_linprog.py:1371: in test_bug_6139
        _assert_success(res, desired_fun=14.95,
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    res =  message: The solution does not satisfy the constraints within the required tolerance of 3.16E-04, yet no errors were ...port.
     success: False
      status: 4
         fun: 14.949999999740342
           x: [ 5.000e+00  4.950e+00  5.000e+00]
         nit: 5
    desired_fun = 14.95, desired_x = array([5.  , 4.95, 5.  ]), rtol = 1e-08
    atol = 1e-08
    
        def _assert_success(res, desired_fun=None, desired_x=None,
                            rtol=1e-8, atol=1e-8):
            # res: linprog result object
            # desired_fun: desired objective function value or None
            # desired_x: desired solution or None
            if not res.success:
                msg = f"linprog status {res.status}, message: {res.message}"
    >           raise AssertionError(msg)
    E           AssertionError: linprog status 4, message: The solution does not satisfy the constraints within the required tolerance of 3.16E-04, yet no errors were raised and there is no certificate of infeasibility or unboundedness. Check whether the slack and constraint residuals are acceptable; if not, consider enabling presolve, adjusting the tolerance option(s), and/or using a different method. Please consider submitting a bug report.
    
    lib/python3.14/site-packages/scipy/optimize/tests/test_linprog.py:69: AssertionError
    _______________ TestMinimumPhase.test_nyquist[numpy-float32-963] _______________
    [gw1] linux -- Python 3.14.6 /nix/store/yqlimndg72hqfcfkpsrcs6lxraw7mnd1-python3-3.14.6/bin/python3.14
    
    self = <scipy.signal.tests.test_fir_filter_design.TestMinimumPhase object at 0x7fffb76f23f0>
    N = 963, dtype = 'float32'
    xp = <module 'scipy._external.array_api_compat.numpy' from '/nix/store/zfhdr6r8ywcnb3wvp5jqcr27fk3vnm68-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/_external/array_api_compat/numpy/__init__.py'>
    
        @xfail_xp_backends("cupy", reason="cupy/cupy#9795")
        @pytest.mark.parametrize("N", (963, 964))
        @pytest.mark.parametrize("dtype", ("float32", "float64"))
        def test_nyquist(self, N, dtype, xp):
            fc = xp.asarray(10)
            fs = 100
            h = firwin(N, fc, window="hann", pass_zero="lowpass", scale=False, fs=fs)
            xp_dtype = getattr(xp, dtype)
            h = xp.astype(h, xp_dtype)
            h_min_sig = minimum_phase(h, method="homomorphic", n_fft=N, half=False)
            H_mag = xp.abs(rfft(h, N))
            H_min_mag = xp.abs(rfft(h_min_sig, N))
            error = H_mag - H_min_mag
            atol = dict(float32=1e-5, float64=1e-13)[dtype]
    >       xp_assert_close(error, xp.zeros_like(error), atol=atol)
    E       AssertionError: 
    E       Not equal to tolerance rtol=0.00138107, atol=1e-05
    E       
    E       Mismatched elements: 1 / 482 (0.207%)
    E       Mismatch at index:
    E        [0]: 1.1444091796875e-05 (ACTUAL), 0.0 (DESIRED)
    E       Max absolute difference among violations: 1.1444092e-05
    E       Max relative difference among violations: inf
    E        ACTUAL: array([ 1.144409e-05,  5.424023e-06, -2.026558e-06, -1.013279e-06,
    E               2.801418e-06,  4.470348e-06,  2.861023e-06, -3.874302e-06,
    E               2.086163e-06, -1.788139e-07,  1.132488e-06, -1.788139e-07,...
    E        DESIRED: array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
    E              0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
    E              0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,...
    
    lib/python3.14/site-packages/scipy/signal/tests/test_fir_filter_design.py:779: AssertionError
    _______________________ TestSTFT.test_roundtrip_float32 ________________________
    [gw2] linux -- Python 3.14.6 /nix/store/yqlimndg72hqfcfkpsrcs6lxraw7mnd1-python3-3.14.6/bin/python3.14
    
    self = <scipy.signal.tests.test_spectral.TestSTFT object at 0x7fffb5d7fe30>
    
        def test_roundtrip_float32(self):
            rng = np.random.RandomState(1234)
        
            settings = [('hann', 1024, 256, 128)]
        
            for window, N, nperseg, noverlap in settings:
                t = np.arange(N)
                x = 10*rng.randn(t.size)
                x = x.astype(np.float32)
        
                _, _, zz = stft(x, nperseg=nperseg, noverlap=noverlap,
                                window=window, detrend=None, padded=False)
        
    >           tr, xr = istft(zz, nperseg=nperseg, noverlap=noverlap,
                               window=window)
    
    lib/python3.14/site-packages/scipy/signal/tests/test_spectral.py:1863: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    
    Zxx = array([[ 0.23852211+0.j        ,  0.11848764+0.j        ,
             1.0724121 +0.j        , ...,  0.25270203+0.j       ...8294464+0.j        ,
             0.50430596+0.j        ,  1.2144408 +0.j        ]],
          shape=(129, 9), dtype=complex64)
    fs = 1.0, window = 'hann', nperseg = 256, noverlap = 128, nfft = None
    input_onesided = True, boundary = True, time_axis = -1, freq_axis = -2
    scaling = 'spectrum'
    
        def istft_compare(Zxx, fs=1.0, window='hann', nperseg=None, noverlap=None,
                          nfft=None, input_onesided=True, boundary=True, time_axis=-1,
                          freq_axis=-2, scaling='spectrum'):
            """Assert that the results from the existing `istft()` and
            `_istft_wrapper()` are close to each other.
        
            Quirks:
            * If ``boundary=False`` the comparison is skipped, since it does not
              make sense with ShortTimeFFT.istft(). Only used in test
              TestSTFT.test_roundtrip_boundary_extension().
            * If ShortTimeFFT.istft() decides the STFT is not invertible, the
              comparison is skipped, since istft() only emits a warning and does not
              return a correct result. Only used in
              ShortTimeFFT.test_roundtrip_not_nola().
            * For comparing the signals an absolute tolerance of the floating point
              resolution was added to account for the low accuracy of float32 (Occurs
              only in TestSTFT.test_roundtrip_float32()).
            """
            kw = dict(Zxx=Zxx, fs=fs, window=window, nperseg=nperseg,
                      noverlap=noverlap, nfft=nfft, input_onesided=input_onesided,
                      boundary=boundary, time_axis=time_axis, freq_axis=freq_axis,
                      scaling=scaling)
        
            t, x = istft(**kw)
            if not boundary:  # skip test_roundtrip_boundary_extension():
                return t, x  # _istft_wrapper does() not implement this case
            try:  # if inversion fails, istft() only emits a warning:
                t_wrapper, x_wrapper, (k_lo, k_hi) = _istft_wrapper(**kw)
            except ValueError as v:  # Do nothing if inversion fails:
                if v.args[0] == "Short-time Fourier Transform not invertible!":
                    return t, x
                raise v
        
            e_msg_part = " of `istft_wrapper()` differ from `istft()`"
            assert_allclose(t, t_wrapper, err_msg=f"Sample times {e_msg_part}")
        
            # Adapted tolerances to account for resolution loss:
            atol = np.finfo(x.dtype).resolution*2  # instead of default atol = 0
            rtol = 1e-7  # default for np.allclose()
        
            # Relax atol on 32-Bit platforms a bit to pass CI tests.
            #  - Not clear why there are discrepancies (in the FFT maybe?)
            #  - Not sure what changed on 'i686' since earlier on those test passed
            if x.dtype == np.float32 and platform.machine() == 'i686':
                # float32 gets only used by TestSTFT.test_roundtrip_float32() so
                # we are using the tolerances from there to circumvent CI problems
                atol, rtol = 1e-4, 1e-5
            else:
                atol = max(atol, 1e-12)  # 2e-15 seems too tight
        
    >       assert_allclose(x_wrapper[k_lo:k_hi], x[k_lo:k_hi], atol=atol, rtol=rtol,
                            err_msg=f"Signal values {e_msg_part}")
    E       AssertionError: 
    E       Not equal to tolerance rtol=1e-07, atol=2e-06
    E       Signal values  of `istft_wrapper()` differ from `istft()`
    E       Mismatched elements: 1 / 767 (0.13%)
    E       Mismatch at index:
    E        [228]: 20.97800563264607 (ACTUAL), 20.978010177612305 (DESIRED)
    E       Max absolute difference among violations: 4.54496623e-06
    E       Max relative difference among violations: 2.16653829e-07
    E        ACTUAL: array([ 6.786297e+00,  2.395560e+00,  1.512266e+00,  8.161272e+00,
    E               1.893534e+01,  6.396327e+00, -9.620287e+00, -2.085266e+01,
    E               1.930247e+01, -1.735349e+01,  1.210384e+01,  7.974354e+00,...
    E        DESIRED: array([ 6.786298e+00,  2.395559e+00,  1.512267e+00,  8.161272e+00,
    E               1.893534e+01,  6.396327e+00, -9.620288e+00, -2.085266e+01,
    E               1.930247e+01, -1.735349e+01,  1.210384e+01,  7.974354e+00,...
    
    lib/python3.14/site-packages/scipy/signal/tests/_scipy_spectral_test_shim.py:309: AssertionError
    _______________________ TestSTFT.test_roundtrip_scaling ________________________
    [gw2] linux -- Python 3.14.6 /nix/store/yqlimndg72hqfcfkpsrcs6lxraw7mnd1-python3-3.14.6/bin/python3.14
    
    self = <scipy.signal.tests.test_spectral.TestSTFT object at 0x7fffb4036fc0>
    
        def test_roundtrip_scaling(self):
            """Verify behavior of scaling parameter. """
            # Create 1024 sample cosine signal with amplitude 2:
            X = np.zeros(513, dtype=complex)
            X[256] = 1024
            x = np.fft.irfft(X)
            power_x = sum(x**2) / len(x)  # power of signal x is 2
        
            # Calculate magnitude-scaled STFT:
            Zs = stft(x, boundary='even', scaling='spectrum')[2]
        
            # Test round trip:
            x1 = istft(Zs, boundary=True, scaling='spectrum')[1]
    >       assert_allclose(x1, x)
    E       AssertionError: 
    E       Not equal to tolerance rtol=1e-07, atol=0
    E       
    E       Mismatched elements: 64 / 1024 (6.25%)
    E       First 5 mismatches are at indices:
    E        [897]: -4.963199601507357e-22 (ACTUAL), 0.0 (DESIRED)
    E        [899]: -1.03154061130407e-20 (ACTUAL), 0.0 (DESIRED)
    E        [901]: -2.930344625821113e-20 (ACTUAL), 0.0 (DESIRED)
    E        [903]: -4.868299587202298e-20 (ACTUAL), 0.0 (DESIRED)
    E        [905]: -9.098104213233174e-20 (ACTUAL), 0.0 (DESIRED)
    E       Max absolute difference among violations: 4.00410733e-17
    E       Max relative difference among violations: inf
    E        ACTUAL: array([ 2.000000e+00,  0.000000e+00, -2.000000e+00, ..., -1.224710e-18,
    E              -2.000000e+00,  5.439144e-19], shape=(1024,))
    E        DESIRED: array([ 2.,  0., -2., ...,  0., -2.,  0.], shape=(1024,))
    
    lib/python3.14/site-packages/scipy/signal/tests/test_spectral.py:2047: AssertionError
    =============================== warnings summary ===============================
    lib/python3.14/site-packages/scipy/conftest.py:181
    lib/python3.14/site-packages/scipy/conftest.py:181
    lib/python3.14/site-packages/scipy/conftest.py:181
    lib/python3.14/site-packages/scipy/conftest.py:181
    lib/python3.14/site-packages/scipy/conftest.py:181
    lib/python3.14/site-packages/scipy/conftest.py:181
    lib/python3.14/site-packages/scipy/conftest.py:181
    lib/python3.14/site-packages/scipy/conftest.py:181
      /nix/store/zfhdr6r8ywcnb3wvp5jqcr27fk3vnm68-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/conftest.py:181: PytestUnknownMarkWarning: Unknown pytest.mark.array_api_backends - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        pytest.param(np, id='numpy', marks=pytest.mark.array_api_backends)
    
    ../yqlimndg72hqfcfkpsrcs6lxraw7mnd1-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
    ../yqlimndg72hqfcfkpsrcs6lxraw7mnd1-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
    ../yqlimndg72hqfcfkpsrcs6lxraw7mnd1-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
    ../yqlimndg72hqfcfkpsrcs6lxraw7mnd1-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
    ../yqlimndg72hqfcfkpsrcs6lxraw7mnd1-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
    ../yqlimndg72hqfcfkpsrcs6lxraw7mnd1-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
    ../yqlimndg72hqfcfkpsrcs6lxraw7mnd1-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
    ../yqlimndg72hqfcfkpsrcs6lxraw7mnd1-python3-3.14.6/lib/python3.14/importlib/__init__.py:88
      /nix/store/yqlimndg72hqfcfkpsrcs6lxraw7mnd1-python3-3.14.6/lib/python3.14/importlib/__init__.py:88: DeprecationWarning: `scipy.odr` is deprecated as of version 1.17.0 and will be removed in SciPy 1.19.0. Please use `https://pypi.org/project/odrpack/` instead.
        return _bootstrap._gcd_import(name[level:], package, level)
    
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
    lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341
      /nix/store/zfhdr6r8ywcnb3wvp5jqcr27fk3vnm68-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/signal/tests/test_bsplines.py:341: PytestUnknownMarkWarning: Unknown pytest.mark.fail_asan - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.fail_asan
    
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
    lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117
      /nix/store/zfhdr6r8ywcnb3wvp5jqcr27fk3vnm68-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/spatial/tests/test_kdtree.py:1117: PytestUnknownMarkWarning: Unknown pytest.mark.fail_asan - is this a typo?  You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/how-to/mark.html
        @pytest.mark.fail_asan
    
    lib/python3.14/site-packages/scipy/sparse/tests/test_64bit.py: 135 warnings
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py: 66 warnings
      /nix/store/3r3lzhc7j31jjmqv9z52y8j252fwwg72-python3.14-numpy-2.5.0/lib/python3.14/site-packages/numpy/_core/_methods.py:49: ComplexWarning: Casting complex values to real discards the imaginary part
        return umr_sum(a, axis, dtype, out, keepdims, initial, where)
    
    lib/python3.14/site-packages/scipy/sparse/tests/test_64bit.py: 108 warnings
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py: 54 warnings
      /nix/store/zfhdr6r8ywcnb3wvp5jqcr27fk3vnm68-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/sparse/_data.py:73: ComplexWarning: Casting complex values to real discards the imaginary part
        self.data.astype(dtype, casting=casting, copy=True),
    
    lib/python3.14/site-packages/scipy/sparse/linalg/_isolve/tests/test_iterative.py::test_maxiter_worsening[gmres-numpy]
    lib/python3.14/site-packages/scipy/sparse/linalg/_isolve/tests/test_iterative.py::test_maxiter_worsening[qmr-numpy]
      /nix/store/zfhdr6r8ywcnb3wvp5jqcr27fk3vnm68-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/_external/array_api_compat/numpy/_aliases.py:94: ComplexWarning: Casting complex values to real discards the imaginary part
        return np.array(obj, copy=copy, dtype=dtype, **kwargs)
    
    lib/python3.14/site-packages/scipy/sparse/tests/test_64bit.py: 27 warnings
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py: 6 warnings
      /nix/store/zfhdr6r8ywcnb3wvp5jqcr27fk3vnm68-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/sparse/_dia.py:164: ComplexWarning: Casting complex values to real discards the imaginary part
        self.data.astype(res_dtype), one, row_sums)
    
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py::TestDOK::test_sum_dtype_pair_of_dtypes
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py::TestDOK::test_sum_dtype_pair_of_dtypes
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py::TestDOK::test_sum_dtype_pair_of_dtypes
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py::TestDOKMatrix::test_sum_dtype_pair_of_dtypes
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py::TestDOKMatrix::test_sum_dtype_pair_of_dtypes
    lib/python3.14/site-packages/scipy/sparse/tests/test_base.py::TestDOKMatrix::test_sum_dtype_pair_of_dtypes
      /nix/store/zfhdr6r8ywcnb3wvp5jqcr27fk3vnm68-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/sparse/_dok.py:628: ComplexWarning: Casting complex values to real discards the imaginary part
        data = np.array(list(self._dict.values()), dtype=dtype)
    
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py: 79 warnings
      /nix/store/zfhdr6r8ywcnb3wvp5jqcr27fk3vnm68-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/stats/_stats_py.py:11063: SmallSampleWarning: One or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.
        return gmean(x, weights=weights, axis=axis, keepdims=keepdims)
    
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py: 160 warnings
      /nix/store/3r3lzhc7j31jjmqv9z52y8j252fwwg72-python3.14-numpy-2.5.0/lib/python3.14/site-packages/numpy/_core/fromnumeric.py:3862: RuntimeWarning: Mean of empty slice
        return _methods._mean(a, axis=axis, dtype=dtype,
    
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-boxcox_llf-args86-kwds86-1-1-False-<lambda>]
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-boxcox_llf-args86-kwds86-1-1-False-<lambda>]
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-boxcox_llf-args86-kwds86-1-1-False-<lambda>]
      /nix/store/zfhdr6r8ywcnb3wvp5jqcr27fk3vnm68-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py:89: SmallSampleWarning: One or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.
        return stats._morestats._boxcox_llf(data, lmb=lmb, axis=axis)
    
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-yeojohnson_llf-args87-kwds87-1-1-False-<lambda>]
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-yeojohnson_llf-args87-kwds87-1-1-False-<lambda>]
    lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py::test_axis_nan_policy_fast[mixed-1-omit-yeojohnson_llf-args87-kwds87-1-1-False-<lambda>]
      /nix/store/zfhdr6r8ywcnb3wvp5jqcr27fk3vnm68-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/stats/tests/test_axis_nan_policy.py:95: SmallSampleWarning: One or more sample arguments is too small; all returned values will be NaN. See documentation for sample size requirements.
        return stats._morestats._yeojohnson_llf(data, lmb=lmb, axis=axis)
    
    lib/python3.14/site-packages/scipy/stats/tests/test_qmc.py::TestUtils::test_geometric_discrepancy_mst_with_zero_distances
      /nix/store/zfhdr6r8ywcnb3wvp5jqcr27fk3vnm68-python3.14-scipy-1.18.0/lib/python3.14/site-packages/scipy/stats/tests/test_qmc.py:234: UserWarning: Sample contains duplicate points.
        assert_allclose(qmc.geometric_discrepancy(sample, method='mst'), 0.5)
    
    -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
    =========================== short test summary info ============================
    FAILED lib/python3.14/site-packages/scipy/optimize/tests/test_linprog.py::TestLinprogIPSparse::test_bug_6139 - AssertionError: linprog status 4, message: The solution does not satisfy the constraints within the required tolerance of 3.16E-04, yet no errors were raised and there is no certificate of infeasibility or unboundedness. Check whether the slack and constraint residuals are acceptable; if not, consider enabling presolve, adjusting the tolerance option(s), and/or using a different method. Please consider submitting a bug report.
    FAILED lib/python3.14/site-packages/scipy/optimize/tests/test_linprog.py::TestLinprogIPSparsePresolve::test_bug_6139 - AssertionError: linprog status 4, message: The solution does not satisfy the constraints within the required tolerance of 3.16E-04, yet no errors were raised and there is no certificate of infeasibility or unboundedness. Check whether the slack and constraint residuals are acceptable; if not, consider enabling presolve, adjusting the tolerance option(s), and/or using a different method. Please consider submitting a bug report.
    FAILED lib/python3.14/site-packages/scipy/signal/tests/test_fir_filter_design.py::TestMinimumPhase::test_nyquist[numpy-float32-963] - AssertionError: 
    Not equal to tolerance rtol=0.00138107, atol=1e-05
    
    Mismatched elements: 1 / 482 (0.207%)
    Mismatch at index:
     [0]: 1.1444091796875e-05 (ACTUAL), 0.0 (DESIRED)
    Max absolute difference among violations: 1.1444092e-05
    Max relative difference among violations: inf
     ACTUAL: array([ 1.144409e-05,  5.424023e-06, -2.026558e-06, -1.013279e-06,
            2.801418e-06,  4.470348e-06,  2.861023e-06, -3.874302e-06,
            2.086163e-06, -1.788139e-07,  1.132488e-06, -1.788139e-07,...
     DESIRED: array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
           0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,
           0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,...
    FAILED lib/python3.14/site-packages/scipy/signal/tests/test_spectral.py::TestSTFT::test_roundtrip_float32 - AssertionError: 
    Not equal to tolerance rtol=1e-07, atol=2e-06
    Signal values  of `istft_wrapper()` differ from `istft()`
    Mismatched elements: 1 / 767 (0.13%)
    Mismatch at index:
     [228]: 20.97800563264607 (ACTUAL), 20.978010177612305 (DESIRED)
    Max absolute difference among violations: 4.54496623e-06
    Max relative difference among violations: 2.16653829e-07
     ACTUAL: array([ 6.786297e+00,  2.395560e+00,  1.512266e+00,  8.161272e+00,
            1.893534e+01,  6.396327e+00, -9.620287e+00, -2.085266e+01,
            1.930247e+01, -1.735349e+01,  1.210384e+01,  7.974354e+00,...
     DESIRED: array([ 6.786298e+00,  2.395559e+00,  1.512267e+00,  8.161272e+00,
            1.893534e+01,  6.396327e+00, -9.620288e+00, -2.085266e+01,
            1.930247e+01, -1.735349e+01,  1.210384e+01,  7.974354e+00,...
    FAILED lib/python3.14/site-packages/scipy/signal/tests/test_spectral.py::TestSTFT::test_roundtrip_scaling - AssertionError: 
    Not equal to tolerance rtol=1e-07, atol=0
    
    Mismatched elements: 64 / 1024 (6.25%)
    First 5 mismatches are at indices:
     [897]: -4.963199601507357e-22 (ACTUAL), 0.0 (DESIRED)
     [899]: -1.03154061130407e-20 (ACTUAL), 0.0 (DESIRED)
     [901]: -2.930344625821113e-20 (ACTUAL), 0.0 (DESIRED)
     [903]: -4.868299587202298e-20 (ACTUAL), 0.0 (DESIRED)
     [905]: -9.098104213233174e-20 (ACTUAL), 0.0 (DESIRED)
    Max absolute difference among violations: 4.00410733e-17
    Max relative difference among violations: inf
     ACTUAL: array([ 2.000000e+00,  0.000000e+00, -2.000000e+00, ..., -1.224710e-18,
           -2.000000e+00,  5.439144e-19], shape=(1024,))
     DESIRED: array([ 2.,  0., -2., ...,  0., -2.,  0.], shape=(1024,))
    = 5 failed, 87712 passed, 8354 skipped, 300 xfailed, 22 xpassed, 682 warnings in 284.35s (0:04:44) =
    

    TestDerivative::test_initial_step[numpy] no longer fails, but TestMinimumPhase::test_nyquist[numpy-float32-963] now will fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: build failure

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions