dipc-cc / hubbard

Python tools for mean-field Hubbard models
https://dipc-cc.github.io/hubbard/
GNU Lesser General Public License v3.0
21 stars 8 forks source link

Some fixes in IO #122

Closed sofiasanz closed 2 years ago

sofiasanz commented 2 years ago

I think it was a little confusing that sometimes the reading methods returned a list of densities or the proper sized numpy.array for the densities (as an example). For this reason I think is more convenient to return the list of densities from all groups only if specified.

Another option is to forget about the groups and just use mode='w' and not allow to append (mode='a') when writing variables in a file.

I also changed that U is saved as its original type (float or array). Previously it was always saved as an array.