MCPcopy Create free account
hub / github.com/dmlc/xgboost / array_interface_dict

Function array_interface_dict

python-package/xgboost/_data_utils.py:424–431  ·  view source on GitHub ↗

Returns an array interface from the input.

(data: np.ndarray)

Source from the content-addressed store, hash-verified

422
423
424def array_interface_dict(data: np.ndarray) -> ArrayInf:
425 """Returns an array interface from the input."""
426 if array_hasobject(data):
427 raise ValueError("Input data contains `object` dtype. Expecting numeric data.")
428 ainf = data.__array_interface__
429 if "mask" in ainf:
430 ainf["mask"] = ainf["mask"].__array_interface__
431 return cast(ArrayInf, ainf)
432
433
434def pd_cat_inf( # pylint: disable=too-many-locals

Callers 3

__init__Method · 0.85
pd_cat_infFunction · 0.85
array_interfaceFunction · 0.85

Calls 1

array_hasobjectFunction · 0.85

Tested by

no test coverage detected