keras-team/keras · error · ValueError
`ragged=True` is not supported with numpy backend
Error message
`ragged=True` is not supported with numpy backend
What it means
Error "`ragged=True` is not supported with numpy backend" thrown in keras-team/keras.
Source
Thrown at keras/src/backend/numpy/core.py:42
def _initialize(self, value):
self._value = value
def _direct_assign(self, value):
self._value = np.array(value, dtype=self._dtype)
def _convert_to_tensor(self, value, dtype=None):
return convert_to_tensor(value, dtype=dtype)
# Overload native accessor.
def __array__(self):
return self.value
def convert_to_tensor(x, dtype=None, sparse=None, ragged=None):
if sparse:
raise ValueError("`sparse=True` is not supported with numpy backend")
if ragged:
raise ValueError("`ragged=True` is not supported with numpy backend")
if dtype is not None:
dtype = standardize_dtype(dtype)
if isinstance(x, Variable):
if dtype and dtype != x.dtype:
return x.value.astype(dtype)
return x.value
if not is_tensor(x) and standardize_dtype(dtype) == "bfloat16":
# Can't create bfloat16 arrays on the fly (e.g. from a h5 Dataset).
# Instead we convert "as is" (to stored dtype) and cast.
return np.asarray(x).astype(dtype)
if dtype is None:
dtype = result_type(
*[getattr(item, "dtype", type(item)) for item in tree.flatten(x)]
)
return np.array(x, dtype=dtype)
def convert_to_numpy(x):View on GitHub (pinned to 7a34a03db6)
When it happens
Trigger: Thrown at keras/src/backend/numpy/core.py:42 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of keras-team/keras@7a34a03db6 (2026-08-25).
Data as JSON: /api/errors/ac47c643d7f6c000.
Report an issue: GitHub.