Skip to content

BUG: test fail in scipy.optimize.tests.test_linprog.TestLinprogIPDense.test_bug_6139 #20216

@andyfaff

Description

@andyfaff

Describe your issue.

In #20210 I'm attempting to port the macosx_arm64 builds from Cirrus to GHA. However, there's currently a test failing in TestLinprogIPDense.test_bug_6139.

I think @mdhaber or @Kai-Striega may be the best people to diagnose.

Reproducing Code Example

Test suite

Error message

_______________________ TestLinprogIPDense.test_bug_6139 _______________________
  ../venv-test/lib/python3.12/site-packages/scipy/optimize/tests/test_linprog.py:1358: in test_bug_6139
      _assert_success(res, desired_fun=14.95,
          A_eq       = array([[    1.,     0.,     0.],
         [-1000.,     0., -1000.]])
          A_ub       = array([[      -0., -1000000., -1010000.]])
          b_eq       = array([ 5.e+00, -1.e+04])
          b_ub       = array([-10000000.])
          bounds     = (None, None)
          c          = array([1, 1, 1])
          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.949999998947106
         x: [ 5.000e+00  4.950e+00  5.000e+00]
       nit: 5
          self       = <scipy.optimize.tests.test_linprog.TestLinprogIPDense object at 0x112a51df0>
  ../venv-test/lib/python3.12/site-packages/scipy/optimize/tests/test_linprog.py:68: in _assert_success
      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.
          atol       = 1e-08
          desired_fun = 14.95
          desired_x  = array([5.  , 4.95, 5.  ])
          msg        = 'linprog status 4, message: The solution does not satisfy the constraints within the required tolerance of 3.16E-04, y...presolve, adjusting the tolerance option(s), and/or using a different method. Please consider submitting a bug report.'
          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.949999998947106
         x: [ 5.000e+00  4.950e+00  5.000e+00]
       nit: 5
          rtol       = 1e-08

SciPy/NumPy/Python version and system information

numpy 2.0.0.dev0, main

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectA clear bug or issue that prevents SciPy from being installed or used as expectedscipy.optimize

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions