tiled.adapters.array.ArrayAdapter

class tiled.adapters.array.ArrayAdapter(array: ndarray[tuple[Any, ...], dtype[Any]], structure: ArrayStructure, *, metadata: Mapping[str, str | int | float | Mapping[str, JSON_ITEM] | Sequence[JSON_ITEM] | None] | None = None, specs: List[Spec] | 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[tuple[Any, ...], dtype[Any]], structure: ArrayStructure, *, metadata: Mapping[str, str | int | float | Mapping[str, JSON_ITEM] | Sequence[JSON_ITEM] | None] | None = None, specs: List[Spec] | None = None) None[source]

Methods

__class_getitem__

Parameterizes a generic class.

__delattr__(name, /)

Implement delattr(self, name).

__dir__(/)

Default dir() implementation.

__eq__(value, /)

Return self==value.

__format__(format_spec, /)

Default object formatter.

__ge__(value, /)

Return self>=value.

__getattribute__(name, /)

Return getattr(self, name).

__getstate__(/)

Helper for pickle.

__gt__(value, /)

Return self>value.

__hash__(/)

Return hash(self).

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

__init_subclass__

Function to initialize subclasses.

__le__(value, /)

Return self<=value.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

__new__(*args, **kwargs)

__reduce__(/)

Helper for pickle.

__reduce_ex__(protocol, /)

Helper for pickle.

__repr__()

Return repr(self).

__setattr__(name, value, /)

Implement setattr(self, name, value).

__sizeof__(/)

Size of object in memory, in bytes.

__str__(/)

Return str(self).

__subclasshook__

Abstract classes can override this to customize issubclass().

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

metadata()

read([slice])

read_block(block[, slice])

structure()

supported_storage()

Attributes

__abstractmethods__

__annotations__

__dict__

__doc__

__module__

__orig_bases__

__parameters__

__slots__

__weakref__

list of weak references to the object

_abc_impl

dims

specs

structure_family