I have a complex array created and stored in hdf5 format as follows:
import numpy as np
import h5py
a = np.random.random((50,50))
b = np.random.random((50,50))
a = a+1j*b
with h5py.File('random.hdf5','w') as f:
dset = f.create_dataset('vec',data=a,dtype='c16',compression="gzip",compression_opts=4)
f.close()
Now I am trying to read this file random.hdf5 via a Fortran routine.
Fortran has no native complex data types for hdf5. How do I go about reading this file?
(Also if it helps, I am using Intel fortran compiler)