MilesCranmer commited on
Commit
7c2bce0
1 Parent(s): 6e07d35

Fix `jl.test_state` issue

Browse files
Files changed (1) hide show
  1. pysr/test/test.py +5 -2
pysr/test/test.py CHANGED
@@ -249,8 +249,11 @@ class TestPipeline(unittest.TestCase):
249
  )
250
 
251
  # We should have that the model state is now a Float32 hof:
252
- jl.test_state = regressor.raw_julia_state_
253
- self.assertTrue(jl.seval("typeof(test_state[2]).parameters[1] == Float32"))
 
 
 
254
  # This should exit almost immediately, and use the old equations
255
  regressor.fit(X, y)
256
 
 
249
  )
250
 
251
  # We should have that the model state is now a Float32 hof:
252
+ test_state = regressor.julia_state_
253
+ self.assertTrue(
254
+ jl.first(jl.typeof(jl.last(test_state)).parameters) == jl.Float32
255
+ )
256
+
257
  # This should exit almost immediately, and use the old equations
258
  regressor.fit(X, y)
259