Skip to content

Commit

Permalink
black
Browse files Browse the repository at this point in the history
  • Loading branch information
galipremsagar committed Nov 22, 2024
1 parent 24e304b commit cfc62cb
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions python-package/xgboost/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,11 +845,21 @@ def _arrow_transform(data: DataType) -> Any:
def _is_cudf_df(data: DataType) -> bool:
return lazy_isinstance(data, "cudf.core.dataframe", "DataFrame")


def _is_cudf_pandas_df(data: DataType) -> bool:
return str(type(data)) == "<class 'pandas.core.frame.DataFrame'>" and str(type(type(data))) == "<class 'cudf.pandas.fast_slow_proxy._FastSlowProxyMeta'>"
return (
str(type(data)) == "<class 'pandas.core.frame.DataFrame'>"
and str(type(type(data)))
== "<class 'cudf.pandas.fast_slow_proxy._FastSlowProxyMeta'>"
)


def _is_cudf_pandas_ser(data: DataType) -> bool:
return str(type(data)) == "<class 'pandas.core.series.Series'>" and str(type(type(data))) == "<class 'cudf.pandas.fast_slow_proxy._FastSlowProxyMeta'>"
return (
str(type(data)) == "<class 'pandas.core.series.Series'>"
and str(type(type(data)))
== "<class 'cudf.pandas.fast_slow_proxy._FastSlowProxyMeta'>"
)


def _get_cudf_cat_predicate() -> Callable[[Any], bool]:
Expand Down

0 comments on commit cfc62cb

Please sign in to comment.