enp.ArraySpec

enp.ArraySpec#

class etils.enp.ArraySpec(shape, dtype)[source]

Bases: object

Structure containing shape/dtype.

shape
dtype
classmethod is_array(array: Any) → bool[source]

Returns True if the given value can be converted to ArraySpec.

classmethod from_array(
array: etils.enp.array_types.typing.Array,
) → etils.enp.array_spec.ArraySpec | None[source]

Construct the ArraySpec from the given array.