nip.utils.nested_array_dict.NumpySpec#

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

Base class for numpy array specifications.

A specification defines meta-data for arrays or nested dictionaries of arrays.

Methods Summary

__eq__(other)

Return self==value.

__init__(shape[, dim_names])

__post_init__()

__repr__()

Return repr(self).

zero()

Return a zero array or dictionary of zero arrays.

Attributes

dim_names

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

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

Return a zero array or dictionary of zero arrays.