keras-team/keras · error · TypeError
unsupported type of indices_or_sections: {type(indices_or_se
Error message
unsupported type of indices_or_sections: {type(indices_or_sections)} What it means
Error "unsupported type of indices_or_sections: {type(indices_or_sections)}" thrown in keras-team/keras.
Source
Thrown at keras/src/backend/openvino/numpy.py:4386
split_lengths.append(indices[i] - indices[i - 1])
last_index_tensor = ov_opset.constant(indices[-1], dtype=Type.i64)
remaining_length_tensor = ov_opset.subtract(
dim_at_axis_tensor, last_index_tensor
)
length_parts = []
length_parts.append(ov_opset.constant(split_lengths, dtype=Type.i64))
length_parts.append(remaining_length_tensor)
length_tensor = ov_opset.concat(length_parts, axis=0)
splits = ov_opset.variadic_split(x, axis_tensor, length_tensor)
result = []
for i in range(len(split_lengths) + 1):
result.append(OpenVINOKerasTensor(splits.output(i)))
return result
raise TypeError(
f"unsupported type of indices_or_sections: {type(indices_or_sections)}"
)
def array_split(x, indices_or_sections, axis=0):
original_shape = x.shape
x = get_ov_output(x)
num_splits_val = indices_or_sections
total_size = original_shape[axis]
if total_size is None:
raise ValueError(
f"Cannot use array_split with static Python logic on dynamic axis. "
f"Axis {axis} has unknown dimension for shape {original_shape}."
)
base_size = total_size // num_splits_val
remainder = total_size % num_splits_valView on GitHub (pinned to 7a34a03db6)
When it happens
Trigger: Thrown at keras/src/backend/openvino/numpy.py:4386 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of keras-team/keras@7a34a03db6 (2026-08-25).
Data as JSON: /api/errors/7d9a67928901436e.
Report an issue: GitHub.