evanberkowitz / supervillain

MCMC for modified Villain constructions
https://supervillain.readthedocs.io/
Other
0 stars 0 forks source link

Feature/extendable #105

Closed evanberkowitz closed 9 months ago

evanberkowitz commented 9 months ago

We can now have extendable data. This was accomplished using a resizable batch dimension.

To accomplish this cleanly required a relatively major refactor of the h5 i/o and a new supervillain.h5.extendable.array datatype which inherits from np.ndarray. Observables and fields in configurations created by actions are extendable automatically.

To endow an object with an extend_h5 method it should inherit from supervillain.h5.Extendable, but for uniformity and simplicity of naming I renamed supervillain.h5.(H5able --> ReadWriteable).

For a simple example, see test/extend-ensemble.py.

This closes #37.