data_models/data_model_helpers.py
def export_griddata_to_hdf5(gd, filename):
    """ Export a GridData to HDF5 format

    :param gd:
    :param filename:
    :return:
    """
    
    if not isinstance(gd, collections.Iterable):
        gd = [gd]
    with h5py.File(filename, 'w') as f:
        f.attrs['number_data_models'] = len(gd)
        for i, m in enumerate(gd):
            assert isinstance(m, GridData)
            mf = f.create_group('GridData%d' % i)
            convert_griddata_to_hdf(m, mf)
        f.flush()
        f.close()
 Export a GridData to HDF5 format

    :param gd:
    :param filename:
    :return:
    
Export a GridData to HDF5 format
Export a GridData to HDF5 format
def export_griddata_to_hdf5(gd, filename):
    if not isinstance(gd, collections.Iterable):
        gd = [gd]
    with h5py.File(filename, 'w') as f:
        f.attrs['number_data_models'] = len(gd)
        for i, m in enumerate(gd):
            assert isinstance(m, GridData)
            mf = f.create_group('GridData%d' % i)
            convert_griddata_to_hdf(m, mf)
        f.flush()
        f.close()
def export_griddata_to_hdf5 ( gd , filename ) : if not isinstance ( gd , collections . Iterable ) : gd = [ gd ] with h5py . File ( filename , 'w' ) as f : f . attrs [ 'number_data_models' ] = len ( gd ) for i , m in enumerate ( gd ) : assert isinstance ( m , GridData ) mf = f . create_group ( 'GridData%d' % i ) convert_griddata_to_hdf ( m , mf ) f . flush ( ) f . close ( )
Export a GridData to HDF5 format
Export a GridData to HDF5 format
""" Export a GridData to HDF5 format

    :param gd:
    :param filename:
    :return:
    """
None
gd
None
filename
None