nip.utils.nested_array_dict.NumpyArraySpec#

class nip.utils.nested_array_dict.NumpyArraySpec(shape: tuple[int] | int, dim_names: tuple[str] | str | None = None)[source]#

Specification for a single numpy array.

Methods Summary

__eq__(other)

Return self==value.

__init__(shape[, dim_names])

__post_init__()

__repr__()

Return repr(self).

zero()

Return a zero array with the specified shape.

Attributes

dim_names

dtype

shape

Methods

__eq__(other)#

Return self==value.

__init__(shape: tuple[int] | int, dim_names: tuple[str] | str | None = None) None#
__post_init__()[source]#
__repr__()#

Return repr(self).

zero() ndarray[Any, dtype[_ScalarType_co]][source]#

Return a zero array with the specified shape.

Returns:

zero_array (NDArray) – The array of zeros with the specified shape.