treescope.ndarray_adapters

treescope.ndarray_adapters#

NDArray adapter interface.

This module defines an interface for adapters that support rendering of multi-dimensional arrays (tensors) in treescope. This can be used to add support for a variety of array types, including numpy arrays, JAX arrays, and others.

Classes

NDArrayAdapter

An adapter to support rendering a multi-dimensional array (tensor) type.

NamedPositionalAxisInfo

Marks an axis as being accessible by name or by position.

NamedPositionlessAxisInfo

Marks an axis as being accessible by name only.

PositionalAxisInfo

Marks an axis as being an ordinary (positional) axis.

ShardingInfo

Summary of the sharding of an array.