Skip to content

Commit

Permalink
Fix jl.test_state issue
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Feb 12, 2024
1 parent 6e07d35 commit 7c2bce0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pysr/test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,11 @@ def test_empty_operators_single_input_warm_start(self):
)

# We should have that the model state is now a Float32 hof:
jl.test_state = regressor.raw_julia_state_
self.assertTrue(jl.seval("typeof(test_state[2]).parameters[1] == Float32"))
test_state = regressor.julia_state_
self.assertTrue(
jl.first(jl.typeof(jl.last(test_state)).parameters) == jl.Float32
)

# This should exit almost immediately, and use the old equations
regressor.fit(X, y)

Expand Down

0 comments on commit 7c2bce0

Please sign in to comment.