{"record":{"id":"c88bc1752dccebf5","repo":"keras-team/keras","slug":"indexing-must-be-either-xy-or-ij","errorCode":null,"errorMessage":"indexing must be either 'xy' or 'ij'","messagePattern":"indexing must be either 'xy' or 'ij'","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/backend/openvino/numpy.py","lineNumber":3125,"sourceCode":"                [1] * original_rank, Type.i32\n            ).output(0)\n            median_result = ov_opset.reshape(\n                median_result, ones_shape, False\n            ).output(0)\n        else:\n            median_result = ov_opset.unsqueeze(median_result, [axis]).output(0)\n\n    return OpenVINOKerasTensor(median_result)\n\n\ndef meshgrid(*x, indexing=\"xy\"):\n    if len(x) < 2:\n        raise ValueError(\n            \"meshgrid requires at least 2 input arrays. \"\n            f\"Received: {len(x)} input array(s).\"\n        )\n    if indexing not in (\"xy\", \"ij\"):\n        raise ValueError(\"indexing must be either 'xy' or 'ij'\")\n\n    tensors = [get_ov_output(xi) for xi in x]\n    n = len(tensors)\n\n    shapes = [\n        ov_opset.shape_of(t, Type.i64).output(0) for t in tensors\n    ]  # each is [Ni]\n    one = ov_opset.constant([1], Type.i64).output(0)\n\n    if indexing == \"xy\":\n        shape_list = [shapes[1], shapes[0]] + shapes[2:]\n        out_shape = ov_opset.concat(shape_list, axis=0).output(0)\n    else:\n        out_shape = ov_opset.concat(shapes, axis=0).output(0)\n\n    outputs = []\n    for i, t in enumerate(tensors):\n        reshape_parts = [one] * n","sourceCodeStart":3107,"sourceCodeEnd":3143,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/backend/openvino/numpy.py#L3107-L3143","documentation":"Raised by keras.ops.numpy.meshgrid in the OpenVINO backend when the indexing argument is not 'xy' or 'ij'. Only these two cartesian indexing conventions are implemented; anything else hits the string guard.","triggerScenarios":"Thrown at keras/src/backend/openvino/numpy.py:3125 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use indexing='xy' (default, first dim varies fastest) or 'ij' (matrix indexing)","Omit indexing to use the default 'xy'"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7a34a03db60bf60042242d6a556fc3be119046a5","analyzedAt":"2026-08-25T21:25:25.994Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}