MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / is_1d_list

Function is_1d_list

python-package/lightgbmmt/basic.py:64–66  ·  view source on GitHub ↗

Check whether data is a 1-D list.

(data)

Source from the content-addressed store, hash-verified

62
63
64def is_1d_list(data):
65 """Check whether data is a 1-D list."""
66 return isinstance(data, list) and (not data or is_numeric(data[0]))
67
68
69def list_to_1d_numpy(data, dtype=np.float32, name='list'):

Callers 3

list_to_1d_numpyFunction · 0.85
c_float_arrayFunction · 0.85
c_int_arrayFunction · 0.85

Calls 1

is_numericFunction · 0.85

Tested by

no test coverage detected