Add __repr__ and asdict() to Stats
Created by: femtobit
Provides more useful __repr__
output for Stats
objects in Python and add asdict
method:
>>> stats = netket.stats.statistics(local_energy)
>>> stats
-8.321 ± 0.8524 (Im=-0.01043, var=58.23, R=1.0056)
>>> stats.asdict()
{'Mean': (-8.320763354546632-0.010434343835340771j), 'Sigma': 0.8524036308501588, 'Variance': 58.231913842857885, 'R': 1.0055981084528502, 'TauCorr': nan}