{"record":{"id":"ac47c643d7f6c000","repo":"keras-team/keras","slug":"ragged-true-is-not-supported-with-numpy-backend","errorCode":null,"errorMessage":"`ragged=True` is not supported with numpy backend","messagePattern":"`ragged=True` is not supported with numpy backend","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"keras/src/backend/numpy/core.py","lineNumber":42,"sourceCode":"    def _initialize(self, value):\n        self._value = value\n\n    def _direct_assign(self, value):\n        self._value = np.array(value, dtype=self._dtype)\n\n    def _convert_to_tensor(self, value, dtype=None):\n        return convert_to_tensor(value, dtype=dtype)\n\n    # Overload native accessor.\n    def __array__(self):\n        return self.value\n\n\ndef convert_to_tensor(x, dtype=None, sparse=None, ragged=None):\n    if sparse:\n        raise ValueError(\"`sparse=True` is not supported with numpy backend\")\n    if ragged:\n        raise ValueError(\"`ragged=True` is not supported with numpy backend\")\n    if dtype is not None:\n        dtype = standardize_dtype(dtype)\n    if isinstance(x, Variable):\n        if dtype and dtype != x.dtype:\n            return x.value.astype(dtype)\n        return x.value\n    if not is_tensor(x) and standardize_dtype(dtype) == \"bfloat16\":\n        # Can't create bfloat16 arrays on the fly (e.g. from a h5 Dataset).\n        # Instead we convert \"as is\" (to stored dtype) and cast.\n        return np.asarray(x).astype(dtype)\n    if dtype is None:\n        dtype = result_type(\n            *[getattr(item, \"dtype\", type(item)) for item in tree.flatten(x)]\n        )\n    return np.array(x, dtype=dtype)\n\n\ndef convert_to_numpy(x):","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/keras-team/keras/blob/7a34a03db60bf60042242d6a556fc3be119046a5/keras/src/backend/numpy/core.py#L24-L60","documentation":"Error \"`ragged=True` is not supported with numpy backend\" thrown in keras-team/keras.","triggerScenarios":"Thrown at keras/src/backend/numpy/core.py:42 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"}