tiled.adapters.sparse.COOAdapter
- class tiled.adapters.sparse.COOAdapter(blocks: Dict[Tuple[int, ...], Tuple[ndarray[tuple[Any, ...], dtype[Any]], Any]], structure: COOStructure, *, metadata: Mapping[str, str | int | float | Mapping[str, JSON_ITEM] | Sequence[JSON_ITEM] | None] | None = None, specs: List[Spec] | None = None)[source]
Wrap sparse Coordinate List (COO) arrays.
- __init__(blocks: Dict[Tuple[int, ...], Tuple[ndarray[tuple[Any, ...], dtype[Any]], Any]], structure: COOStructure, *, metadata: Mapping[str, str | int | float | Mapping[str, JSON_ITEM] | Sequence[JSON_ITEM] | None] | None = None, specs: List[Spec] | None = None) None[source]
Construct from blocks with coords given in block-local reference frame. Parameters ———- blocks : structure : metadata : specs :
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__(blocks, structure, *[, metadata, specs])Construct from blocks with coords given in block-local reference frame.
__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_arrays(coords, data, shape[, dims, ...])Simplest constructor.
from_coo(coo, *[, dims, metadata, specs])Construct from sparse.COO object.
from_global_ref(blocks, shape, chunks, *[, ...])Construct from blocks with coords given in global reference frame.
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_implspecsstructure_family