keras-team/keras · error · ValueError
meshgrid requires at least 2 input arrays. Received: {len(x)
Error message
meshgrid requires at least 2 input arrays. Received: {len(x)} input array(s). What it means
Error "meshgrid requires at least 2 input arrays. Received: {len(x)} input array(s)." thrown in keras-team/keras.
Source
Thrown at keras/src/backend/openvino/numpy.py:3120
# Handle keepdims
if keepdims:
if flattened_all:
# When axis=None, keepdims should restore all dimensions as 1
ones_shape = ov_opset.constant(
[1] * original_rank, Type.i32
).output(0)
median_result = ov_opset.reshape(
median_result, ones_shape, False
).output(0)
else:
median_result = ov_opset.unsqueeze(median_result, [axis]).output(0)
return OpenVINOKerasTensor(median_result)
def meshgrid(*x, indexing="xy"):
if len(x) < 2:
raise ValueError(
"meshgrid requires at least 2 input arrays. "
f"Received: {len(x)} input array(s)."
)
if indexing not in ("xy", "ij"):
raise ValueError("indexing must be either 'xy' or 'ij'")
tensors = [get_ov_output(xi) for xi in x]
n = len(tensors)
shapes = [
ov_opset.shape_of(t, Type.i64).output(0) for t in tensors
] # each is [Ni]
one = ov_opset.constant([1], Type.i64).output(0)
if indexing == "xy":
shape_list = [shapes[1], shapes[0]] + shapes[2:]
out_shape = ov_opset.concat(shape_list, axis=0).output(0)
else:View on GitHub (pinned to 7a34a03db6)
When it happens
Trigger: Thrown at keras/src/backend/openvino/numpy.py:3120 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/3c96540a13e14e21.
Report an issue: GitHub.