tiled.adapters.array.ArrayAdapter

class tiled.adapters.array.ArrayAdapter(array: ndarray[Any, dtype[Any]], structure: ArrayStructure, *, metadata: Dict[str, str | int | float | bool | Dict[str, Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]] | List[Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]]] | None = None, specs: List[Spec] | None = None, access_policy: AccessPolicy | None = None)[source]

Wrap an array-like object in an interface that Tiled can serve.

Examples

Wrap any array-like.

>>> ArrayAdapter.from_array(numpy.random.random((100, 100)))
>>> ArrayAdapter.from_array(dask.array.from_array(numpy.random.random((100, 100)), chunks=(100, 50)))
__init__(array: ndarray[Any, dtype[Any]], structure: ArrayStructure, *, metadata: Dict[str, str | int | float | bool | Dict[str, Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]] | List[Dict[str, str | int | float | bool | Dict[str, JSON] | List[JSON]]]] | None = None, specs: List[Spec] | None = None, access_policy: AccessPolicy | None = None) None[source]
Parameters:
array
structure
metadata
specs
access_policy

Methods

__init__(array, structure, *[, metadata, ...])

from_array(array, *[, shape, chunks, dims, ...])

metadata()

read([slice])

read_block(block[, slice])

structure()

Attributes

dims

structure_family