Skip to content

Commit

Permalink
Pylint.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Sep 12, 2021
1 parent d569caf commit 90b7366
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python-package/xgboost/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

c_bst_ulong = ctypes.c_uint64 # pylint: disable=invalid-name

cat_t = "c"
CAT_T = "c"


def _warn_unused_missing(data, missing):
Expand Down Expand Up @@ -260,7 +260,7 @@ def _transform_pandas_df(
feature_types.append(_pandas_dtype_mapper[
dtype.subtype.name])
elif is_categorical_dtype(dtype) and enable_categorical:
feature_types.append(cat_t)
feature_types.append(CAT_T)
else:
feature_types.append(_pandas_dtype_mapper[dtype.name])

Expand Down Expand Up @@ -469,7 +469,7 @@ def _transform_cudf_df(
dtypes = data.dtypes
for dtype in dtypes:
if is_categorical_dtype(dtype) and enable_categorical:
feature_types.append(cat_t)
feature_types.append(CAT_T)
else:
feature_types.append(_pandas_dtype_mapper[dtype.name])
return data, feature_names, feature_types
Expand Down

0 comments on commit 90b7366

Please sign in to comment.