{"record":{"id":"e04c319534138f35","repo":"keras-team/keras","slug":"axes-must-be-different","errorCode":null,"errorMessage":"axes must be different","messagePattern":"axes must be different","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/backend/openvino/numpy.py","lineNumber":2027,"sourceCode":"    \"\"\"Rotate an array by 90 degrees in the plane specified by axes.\"\"\"\n    array = get_ov_output(array)\n\n    if not isinstance(axes, (tuple, list)) or len(axes) != 2:\n        raise ValueError(\"axes must be a tuple of length 2\")\n\n    shape = array.get_partial_shape()\n    ndim = shape.rank.get_length()\n    if ndim is None:\n        raise ValueError(\n            \"`rot90` does not support tensors with dynamic rank \"\n            \"for the OpenVINO backend.\"\n        )\n\n    axis1 = canonicalize_axis(axes[0], ndim)\n    axis2 = canonicalize_axis(axes[1], ndim)\n\n    if axis1 == axis2:\n        raise ValueError(\"axes must be different\")\n\n    k = k % 4\n    if k == 0:\n        return OpenVINOKerasTensor(array)\n\n    result = array\n\n    for _ in range(k):\n        # 1️ Transpose axis1 <-> axis2\n        perm = list(range(ndim))\n        perm[axis1], perm[axis2] = perm[axis2], perm[axis1]\n        perm_const = ov_opset.constant(perm, Type.i32).output(0)\n        result = ov_opset.transpose(result, perm_const).output(0)\n\n        # 2️ Reverse along axis1 using StridedSlice\n        begin = [0] * ndim\n        end = [0] * ndim\n        strides = [1] * ndim","sourceCodeStart":2009,"sourceCodeEnd":2045,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/backend/openvino/numpy.py#L2009-L2045","documentation":"Error \"axes must be different\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/backend/openvino/numpy.py:2027 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"}