Skip to content

Commit

Permalink
Replaced version check code
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherbunn committed Jul 27, 2023
1 parent d387dcb commit bd6ccba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def determine_periodicity(
"""
# Only need to handle nullable types on pandas < 2. Kept for backwards compatibility with pandas 1.x.
if pd.__version__[0] == "1":
if int(pd.__version__.split(".")[0]) < 2:
X, y = cls._handle_nullable_types(cls, X, y)

Check warning on line 156 in evalml/pipelines/components/transformers/preprocessing/decomposer.py

View check run for this annotation

Codecov / codecov/patch

evalml/pipelines/components/transformers/preprocessing/decomposer.py#L156

Added line #L156 was not covered by tests

def _get_rel_max_from_acf(y):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def test_decomposer_determine_periodicity(
pytest.param(
False,
marks=pytest.mark.xfail(
condition=pd.__version__[0] == "1",
condition=int(pd.__version__.split(".")[0]) < 2,
strict=True,
raises=AssertionError,
reason="pandas 1.x does not recognize np.Nan in Float64 subtracted_floats.",
Expand Down

0 comments on commit bd6ccba

Please sign in to comment.