Unverified Commit de1f3cb3 authored by Nikita Titov's avatar Nikita Titov Committed by GitHub
Browse files

[python] removed excess condition (#2385)

parent 22cd39e8
......@@ -202,7 +202,7 @@ FIELD_TYPE_MAPPER = {"label": C_API_DTYPE_FLOAT32,
def convert_from_sliced_object(data):
"""Fix the memory of multi-dimensional sliced object."""
if data.base is not None and isinstance(data, np.ndarray) and isinstance(data.base, np.ndarray):
if isinstance(data, np.ndarray) and isinstance(data.base, np.ndarray):
if not data.flags.c_contiguous:
warnings.warn("Usage of np.ndarray subset (sliced data) is not recommended "
"due to it will double the peak memory cost in LightGBM.")
......
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