Skip to content

Commit

Permalink
Fix a unit test when cudf is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Hyunsu Cho committed Aug 8, 2020
1 parent 9021a75 commit 377580a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python-package/xgboost/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def _is_cudf_df(data):
import cudf
except ImportError:
return False
return isinstance(data, cudf.DataFrame)
return hasattr(cudf, 'DataFrame') and isinstance(data, cudf.DataFrame)


def _cudf_array_interfaces(data):
Expand Down

0 comments on commit 377580a

Please sign in to comment.