def write_hdf5(arr, outfile):
    with h5py.File(outfile, 'w') as f:
        f.create_dataset('image', data=arr, dtype=arr.dtype)
def write_hdf5(arr, outfile):
    with h5py.File(outfile, 'w') as f:
        f.create_dataset('image', data=arr, dtype=arr.dtype)