Unverified Commit 06a1ee25 authored by Madnex's avatar Madnex Committed by GitHub
Browse files

[python-package] prefix several internal functions with _ (#5545)

parent 0c5f46f8
This diff is collapsed.
......@@ -609,17 +609,17 @@ def test_list_to_1d_numpy(collection, dtype):
y = pd_Series(y)
if isinstance(y, np.ndarray) and len(y.shape) == 2:
with pytest.warns(UserWarning, match='column-vector'):
lgb.basic.list_to_1d_numpy(y)
lgb.basic._list_to_1d_numpy(y)
return
elif isinstance(y, list) and isinstance(y[0], list):
with pytest.raises(TypeError):
lgb.basic.list_to_1d_numpy(y)
lgb.basic._list_to_1d_numpy(y)
return
elif isinstance(y, pd_Series) and y.dtype == object:
with pytest.raises(ValueError):
lgb.basic.list_to_1d_numpy(y)
lgb.basic._list_to_1d_numpy(y)
return
result = lgb.basic.list_to_1d_numpy(y, dtype=dtype)
result = lgb.basic._list_to_1d_numpy(y, dtype=dtype)
assert result.size == 10
assert result.dtype == dtype
......
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