Unverified Commit 2fe2bf06 authored by James Lamb's avatar James Lamb Committed by GitHub
Browse files

[python-package] add hint on dtypes in Dataset.set_field() (#5787)

parent 17878922
...@@ -2356,6 +2356,7 @@ class Dataset: ...@@ -2356,6 +2356,7 @@ class Dataset:
ctypes.c_int(0), ctypes.c_int(0),
ctypes.c_int(_FIELD_TYPE_MAPPER[field_name]))) ctypes.c_int(_FIELD_TYPE_MAPPER[field_name])))
return self return self
dtype: "np.typing.DTypeLike"
if field_name == 'init_score': if field_name == 'init_score':
dtype = np.float64 dtype = np.float64
if _is_1d_collection(data): if _is_1d_collection(data):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment