utilities_h5.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:export2hdf5 作者: bwrc 项目源码 文件源码
def add_text_h5(fid, path, data):
    """Add text data (UTF-8) to the given path in the HDF5 file
       with handle fid.

    Arguments:
       - fid is the file handle to the HDF5 file

       - path is the base path inside the HDF5 file

       - data is the text data as a string
    """

    dset = fid.create_dataset(name=path,
                              shape=(1,),
                              dtype=h5py.special_dtype(vlen=str),
                              data=data,
                              compression="gzip")
评论列表


问题


面经


文章

微信
公众号

扫码关注公众号