netket.utils.HashableArray

class netket.utils.HashableArray(wrapped)[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).

__init__(wrapped)

Initialize self. See help(type(self)) for accurate signature.

Parameters

wrapped (Union[numpy.ndarray, jaxlib.xla_extension.DeviceArray, jax.core.Tracer]) –

Return type

None

Methods