dask.array.from_tiledb

dask.array.from_tiledb

dask.array.from_tiledb(uri, attribute=None, chunks=None, storage_options=None, **kwargs)[source]

Load array from the TileDB storage format

See https://docs.tiledb.io for more information about TileDB.

Parameters
uri: TileDB array or str

Location to save the data

attribute: str or None

Attribute selection (single-attribute view on multi-attribute array)

Returns
A Dask Array

Examples

>>> import tempfile, tiledb
>>> import dask.array as da, numpy as np
>>> uri = tempfile.NamedTemporaryFile().name
>>> _ = tiledb.from_numpy(uri, np.arange(0,9).reshape(3,3))  # create a tiledb array
>>> tdb_ar = da.from_tiledb(uri)  # read back the array
>>> tdb_ar.shape
(3, 3)
>>> tdb_ar.mean().compute()
4.0