{"record":{"id":"44b1774675d8c540","repo":"keras-team/keras","slug":"invalid-value-for-argument-order-expected-one-o-44b177","errorCode":null,"errorMessage":"Invalid value for argument `order`. Expected one of [0, 1]. Received: order={order}","messagePattern":"Invalid value for argument `order`\\. Expected one of \\[0, 1\\]\\. Received: order=(.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/backend/openvino/image.py","lineNumber":1277,"sourceCode":"    size2_plus1 = ov_opset.add(\n        ov_opset.multiply(two_c, size_node), one_c\n    ).output(0)\n    mirrored = _mirror_index_fixer(idx2, size2_plus1)\n    # integer divide by 2 (result is always >= 0, so truncated == floor)\n    return ov_opset.divide(ov_opset.subtract(mirrored, one_c), two_c).output(0)\n\n\ndef map_coordinates(\n    inputs, coordinates, order, fill_mode=\"constant\", fill_value=0\n):\n    fill_modes = {\"constant\", \"nearest\", \"wrap\", \"mirror\", \"reflect\"}\n    if fill_mode not in fill_modes:\n        raise ValueError(\n            \"Invalid value for argument `fill_mode`. Expected one of \"\n            f\"{fill_modes}. Received: fill_mode={fill_mode}\"\n        )\n    if order not in (0, 1):\n        raise ValueError(\n            \"Invalid value for argument `order`. Expected one of \"\n            f\"[0, 1]. Received: order={order}\"\n        )\n\n    inputs = convert_to_tensor(inputs)\n    coordinates = convert_to_tensor(coordinates)\n    inputs_ov = get_ov_output(inputs)\n    coords_ov = get_ov_output(coordinates)\n    input_shape = inputs_ov.get_partial_shape()\n    ndim = input_shape.rank.get_length()\n    coords_shape = coords_ov.get_partial_shape()\n    if coords_shape.rank.is_static and coords_shape.rank.get_length() < 2:\n        raise ValueError(\n            \"Invalid coordinates rank: expected at least rank 2.\"\n            f\" Received input with shape: {tuple(coords_shape.to_shape())}\"\n        )\n    if coords_shape[0].is_static and coords_shape[0].get_length() != ndim:\n        raise ValueError(","sourceCodeStart":1259,"sourceCodeEnd":1295,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/backend/openvino/image.py#L1259-L1295","documentation":"Error \"Invalid value for argument `order`. Expected one of [0, 1]. Received: order={order}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/backend/openvino/image.py:1277 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7a34a03db60bf60042242d6a556fc3be119046a5","analyzedAt":"2026-08-25T21:25:25.994Z","schemaVersion":2},"datasetVersion":"2026-08-26T02:17:13.382Z"}