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

Function array_hasobject

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

Whether the numpy array has object dtype.

(data: DataType)

Source from the content-addressed store, hash-verified

85
86
87def array_hasobject(data: DataType) -> bool:
88 """Whether the numpy array has object dtype."""
89 return (
90 hasattr(data, "dtype")
91 and hasattr(data.dtype, "hasobject")
92 and data.dtype.hasobject
93 )
94
95
96def cuda_array_interface_dict(data: _CudaArrayLikeArg) -> CudaArrayInf:

Callers 4

_transform_cupy_arrayFunction · 0.85
_ensure_np_dtypeFunction · 0.85
array_interface_dictFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected