Skip to content

Commit

Permalink
Non-optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
trivialfis committed Oct 12, 2021
1 parent a77ac74 commit 2a128a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python-package/xgboost/data.py
Expand Up @@ -807,7 +807,7 @@ def _meta_from_tuple(data, field, dtype, handle):


def _meta_from_cudf_df(data, field: str, handle: ctypes.c_void_p) -> None:
if field is not None and field != "label" and len(data.columns) != 1:
if field != "label" and len(data.columns) != 1:
raise ValueError("Expecting meta-info to contain a single column")
if field == "label" and len(data.columns) > 2:
raise ValueError("Invalid shape for label.")
Expand Down

0 comments on commit 2a128a2

Please sign in to comment.