netket.utils.HashableArray#

class netket.utils.HashableArray[source]#

Bases: object

This class wraps a numpy or jax array in order to make it hashable and equality comparable (which is necessary since a well-defined hashable object needs to satisfy obj1 == obj2 whenever hash(obj1) == hash(obj2).

The underlying array can also be accessed using numpy.asarray(self).

Inheritance
Inheritance diagram of netket.utils.HashableArray
Attributes
dtype#
ndim#
shape#
size#
wrapped: Union[ndarray, Array]#

The wrapped array. Note that this array is read-only.

Methods
replace(**updates)#

Returns a new object replacing the specified fields with new values.