Skip to content

Commit

Permalink
Use packaging.version for numpy version check as suggested
Browse files Browse the repository at this point in the history
  • Loading branch information
seberg committed Jul 12, 2024
1 parent 174f2b3 commit 7b569a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/cudf/cudf/tests/test_scalar.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import pandas as pd
import pyarrow as pa
import pytest
from packaging import version

import rmm

Expand Down Expand Up @@ -260,8 +261,7 @@ def test_generic_null_scalar_construction_fails(value):
def test_scalar_out_of_bounds_pyint_fails(value, dtype):
# Test that we align with NumPy on scalar creation behavior from
# Python integers.
np_ver = np.lib.NumpyVersion(np.__version__)
if np_ver >= "2.0.0":
if version.parse(np.__version__) >= version.parse("2.0"):
with pytest.raises(OverflowError):
cudf.Scalar(value, dtype)
else:
Expand Down

0 comments on commit 7b569a1

Please sign in to comment.