Check cudf lazily (#8084)

This commit is contained in:
Rafail Giavrimis 2022-07-17 02:27:43 +01:00 committed by GitHub
parent a33f35eecf
commit 579ab23b10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -745,11 +745,7 @@ def _from_cudf_df(
def _is_cudf_ser(data: DataType) -> bool: def _is_cudf_ser(data: DataType) -> bool:
try: return lazy_isinstance(data, "cudf.core.series", "Series")
import cudf
except ImportError:
return False
return isinstance(data, cudf.Series)
def _is_cupy_array(data: DataType) -> bool: def _is_cupy_array(data: DataType) -> bool: