tiled.adapters.sparse.COOAdapter

class tiled.adapters.sparse.COOAdapter(blocks: Dict[Tuple[int, ...], Tuple[ndarray[Any, dtype[Any]], Any]], structure: COOStructure, *, 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 sparse Coordinate List (COO) arrays.

__init__(blocks: Dict[Tuple[int, ...], Tuple[ndarray[Any, dtype[Any]], Any]], structure: COOStructure, *, 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]

Construct from blocks with coords given in block-local reference frame. Parameters ———- blocks : structure : metadata : specs : access_policy :

Methods

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

Construct from blocks with coords given in block-local reference frame.

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()

Attributes

structure_family