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, ...])

Parameters:

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

Parameters:

metadata()

Returns:

read([slice])

Parameters:

read_block(block[, slice])

Parameters:

structure()

Returns:

Attributes

dims

Returns:

structure_family