diff --git a/backend/ibex/data_source/imas_python_source.py b/backend/ibex/data_source/imas_python_source.py index 0471bee..3658229 100644 --- a/backend/ibex/data_source/imas_python_source.py +++ b/backend/ibex/data_source/imas_python_source.py @@ -58,6 +58,10 @@ def data_serializer_custom(self, obj): return obj.value if isinstance(obj, np.ndarray) and not obj.flags.c_contiguous: return np.ascontiguousarray(obj) + if isinstance(obj, (np.ndarray, IDSNumericArray)): # np.arrays with not supported dtype + return obj.tolist() + if isinstance(obj, complex): # not supported dtype extracted from np.array + return (obj.real, obj.imag) raise TypeError def _open_entry(self, uri: str) -> imas.DBEntry: