{"record":{"id":"bd4a8910a5895a62","repo":"keras-team/keras","slug":"invalid-coordinates-rank-expected-at-least-rank-2-bd4a89","errorCode":null,"errorMessage":"Invalid coordinates rank: expected at least rank 2. Received input with shape: {coordinate_arrs.shape}","messagePattern":"Invalid coordinates rank: expected at least rank 2\\. Received input with shape: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/backend/tensorflow/image.py","lineNumber":670,"sourceCode":"    inputs, coordinates, order, fill_mode=\"constant\", fill_value=0.0\n):\n    input_arr = convert_to_tensor(inputs)\n    coordinate_arrs = convert_to_tensor(coordinates)\n\n    if coordinate_arrs.shape[0] != len(input_arr.shape):\n        raise ValueError(\n            \"First dim of `coordinates` must be the same as the rank of \"\n            \"`inputs`. \"\n            f\"Received inputs with shape: {input_arr.shape} and coordinate \"\n            f\"leading dim of {coordinate_arrs.shape[0]}\"\n        )\n    if len(coordinate_arrs.shape) < 2:\n        raise ValueError(\n            \"Invalid coordinates rank: expected at least rank 2.\"\n            f\" Received input with shape: {coordinate_arrs.shape}\"\n        )\n    if fill_mode not in MAP_COORDINATES_FILL_MODES:\n        raise ValueError(\n            \"Invalid value for argument `fill_mode`. Expected one of \"\n            f\"{set(MAP_COORDINATES_FILL_MODES.keys())}. Received: \"\n            f\"fill_mode={fill_mode}\"\n        )\n\n    fill_value = convert_to_tensor(fill_value, dtype=input_arr.dtype)\n\n    coordinate_arrs = tf.unstack(coordinate_arrs, axis=0)\n\n    if order == 0:\n        interp_fun = _nearest_indices_and_weights\n    elif order == 1:\n        interp_fun = _linear_indices_and_weights\n    else:\n        raise NotImplementedError(\"map_coordinates currently requires order<=1\")\n\n    def process_coordinates(coords, size):\n        if fill_mode == \"constant\":","sourceCodeStart":652,"sourceCodeEnd":688,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/backend/tensorflow/image.py#L652-L688","documentation":"Error \"Invalid coordinates rank: expected at least rank 2. Received input with shape: {coordinate_arrs.shape}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/backend/tensorflow/image.py:670 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"}