Dask

Interface for Dask arrays

class DaskInterface(shape: Tuple[int, ...] | Any, dtype: str | type | Any | generic)[source]

Interface for Dask Array

return_type

alias of Array

classmethod check(array: Any) bool[source]

check if array is a dask array

classmethod enabled() bool[source]

check if we successfully imported dask

classmethod to_json(array: Array, info: SerializationInfo | None = None) list[source]

Convert an array to a JSON serializable array by first converting to a numpy array and then to a list.

Note

This is likely a very memory intensive operation if you are using dask for large arrays. This can’t be avoided, since the creation of the json string happens in-memory with Pydantic, so you are likely looking for a different method of serialization here using the python object itself rather than its JSON representation.