3
0
mirror of https://github.com/triqs/dft_tools synced 2025-01-13 14:29:01 +01:00
Olivier Parcollet f2c7d449cc First commit : triqs libs version 1.0 alpha1
for earlier commits, see TRIQS0.x repository.
2013-07-17 19:24:07 +02:00

12 lines
329 B
Python

from pytriqs.archive import *
import numpy
R = HDFArchive('myfile.h5', 'w') # Opens the file myfile.h5, in read/write mode
R['mu'] = 1.29
R.create_group('S')
S= R['S']
S['a'] = "a string"
S['b'] = numpy.array([1,2,3])
del R,S # closing the files (optional : file is closed when the references to R and subgroup are deleted)