probly.representation.array_like.NumpyArrayLikeConvertible

class probly.representation.array_like.NumpyArrayLikeConvertible(*args, **kwargs)[source]

Bases: ArrayLike, Protocol, Generic

Protocol for array-like objects that can be converted to numpy arrays.

property T: Any

Transposed array.

property device: Any

Device of the array.

property dtype: Any

Data type of the array.

property mT: Any

Matrix transposed array.

property ndim: int

Number of dimensions.

property shape: tuple[int, ...]

Shape of the array.

property size: int

Number of elements in the array.

to_device(device: Literal['cpu'], /, *, stream: int | Any | None = None) Self[source]

Move the array to a device.