Skip to content

Commit

Permalink
test: update deprecated sklearn test syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Feb 22, 2025
1 parent b03e02b commit 4cb1ef6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pysr/test/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import numpy as np
import pandas as pd
import sympy # type: ignore
from sklearn.utils.estimator_checks import check_estimator
from sklearn.utils.estimator_checks import estimator_checks_generator

from pysr import (
ParametricExpressionSpec,
Expand Down Expand Up @@ -930,9 +930,8 @@ def test_scikit_learn_compatibility(self):
temp_equation_file=True,
) # Return early.

check_generator = check_estimator(model, generate_only=True)
exception_messages = []
for _, check in check_generator:
for _, check in estimator_checks_generator(model):
if check.func.__name__ in {
# We can use complex data, so avoid this check
"check_complex_data",
Expand Down

0 comments on commit 4cb1ef6

Please sign in to comment.