Skip to content

Commit

Permalink
fix numpy2.2 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Dec 10, 2024
1 parent fced774 commit bd1b31f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ortools/linear_solver/python/model_builder_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1478,7 +1478,7 @@ def assertLinearExpressionAlmostEqual(
) -> None:
"""Test that the two linear expressions are almost equal."""
self.assertEqual(len(expr1.variable_indices), len(expr2.variable_indices))
if expr1.variable_indices:
if len(expr1.variable_indices) > 0: # pylint: disable=g-explicit-length-test
self.assertSequenceEqual(expr1.variable_indices, expr2.variable_indices)
self.assertSequenceAlmostEqual(
expr1.coefficients, expr2.coefficients, places=5
Expand Down

0 comments on commit bd1b31f

Please sign in to comment.