MilesCranmer commited on
Commit
5dfd8d5
1 Parent(s): fd102b8

Fix dimensional constraints test

Browse files
Files changed (1) hide show
  1. pysr/test/test.py +4 -1
pysr/test/test.py CHANGED
@@ -1107,7 +1107,10 @@ class TestDimensionalConstraints(unittest.TestCase):
1107
  self.assertNotIn("x1", best["equation"])
1108
  self.assertIn("x2", best["equation"])
1109
  self.assertEqual(best["complexity"], 3)
1110
- self.assertGreater(model.equations_.iloc[0].loss, 1e-6)
 
 
 
1111
 
1112
  # With pkl file:
1113
  pkl_file = str(temp_dir / "equation_file.pkl")
 
1107
  self.assertNotIn("x1", best["equation"])
1108
  self.assertIn("x2", best["equation"])
1109
  self.assertEqual(best["complexity"], 3)
1110
+ self.assertTrue(
1111
+ model.equations_.iloc[0].complexity > 1
1112
+ or model.equations_.iloc[0].loss > 1e-6
1113
+ )
1114
 
1115
  # With pkl file:
1116
  pkl_file = str(temp_dir / "equation_file.pkl")