{"record":{"id":"7e4324b908cb8d59","repo":"keras-team/keras","slug":"unsupported-reduction-reduction-7e4324","errorCode":null,"errorMessage":"Unsupported reduction: {reduction}","messagePattern":"Unsupported reduction: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/backend/numpy/core.py","lineNumber":360,"sourceCode":"    return zeros\n\n\ndef scatter_update(inputs, indices, updates, reduction=None):\n    indices = np.array(indices)\n    indices = np.transpose(indices)\n    idx = tuple(indices)\n    if reduction is None:\n        inputs[idx] = updates\n    elif reduction == \"add\":\n        np.add.at(inputs, idx, updates)\n    elif reduction == \"max\":\n        np.maximum.at(inputs, idx, updates)\n    elif reduction == \"min\":\n        np.minimum.at(inputs, idx, updates)\n    elif reduction == \"mul\":\n        np.multiply.at(inputs, idx, updates)\n    else:\n        raise ValueError(f\"Unsupported reduction: {reduction}\")\n    return inputs\n\n\ndef slice(inputs, start_indices, shape):\n    # Validate inputs\n    if len(start_indices) != len(shape):\n        raise ValueError(\n            \"Length of `start_indices` must match length of `shape`. \"\n            f\"Received: start_indices={start_indices}, shape={shape}\"\n        )\n\n    # Generate list of indices arrays for each dimension\n    indices = [\n        np.arange(start, start + length)\n        for start, length in zip(start_indices, shape)\n    ]\n\n    # Use np.ix_ to create a multidimensional index array","sourceCodeStart":342,"sourceCodeEnd":378,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/backend/numpy/core.py#L342-L378","documentation":"Error \"Unsupported reduction: {reduction}\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/backend/numpy/core.py:360 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"}