brainstorm/structure/network.py
def save_as_hdf5(self, filename, comment=''):
        """
        Save this network as an HDF5 file.
        The file will contain a description of this network and the parameters.

        Args:
            filename (str):
                Name of the file this network should be saved to.
                All directories have to exist already.

            comment (Optional[str]):
                An optional comment that will be saved inside the file.
        """
        with h5py.File(filename, 'w') as f:
            f.attrs.create('info', get_brainstorm_info())
            f.attrs.create('format', b'Network file v1.0')
            if comment:
                f.attrs.create('comment', comment.encode())
            description = get_description(self)
            f['description'] = json.dumps(description).encode()
            f.create_dataset(
                'parameters', compression='gzip',
                data=self.get('parameters'))

        Save this network as an HDF5 file.
        The file will contain a description of this network and the parameters.

        Args:
            filename (str):
                Name of the file this network should be saved to.
                All directories have to exist already.

            comment (Optional[str]):
                An optional comment that will be saved inside the file.
        
Save this network as an HDF5 file.
The file will contain a description of this network and the parameters.
Save this network as an HDF5 file . The file will contain a description of this network and the parameters .
def save_as_hdf5(self, filename, comment=''):
        with h5py.File(filename, 'w') as f:
            f.attrs.create('info', get_brainstorm_info())
            f.attrs.create('format', b'Network file v1.0')
            if comment:
                f.attrs.create('comment', comment.encode())
            description = get_description(self)
            f['description'] = json.dumps(description).encode()
            f.create_dataset(
                'parameters', compression='gzip',
                data=self.get('parameters'))
def save_as_hdf5 ( self , filename , comment = '' ) : with h5py . File ( filename , 'w' ) as f : f . attrs . create ( 'info' , get_brainstorm_info ( ) ) f . attrs . create ( 'format' , b'Network file v1.0' ) if comment : f . attrs . create ( 'comment' , comment . encode ( ) ) description = get_description ( self ) f [ 'description' ] = json . dumps ( description ) . encode ( ) f . create_dataset ( 'parameters' , compression = 'gzip' , data = self . get ( 'parameters' ) )
Save this network as an HDF5 file.
Save this network as an HDF5 file .
"""
        Save this network as an HDF5 file.
        The file will contain a description of this network and the parameters.

        Args:
            filename (str):
                Name of the file this network should be saved to.
                All directories have to exist already.

            comment (Optional[str]):
                An optional comment that will be saved inside the file.
        """
self
filename
Name of the file this network should be saved to.
All directories have to exist already.
Name of the file this network should be saved to . All directories have to exist already .
comment
An optional comment that will be saved inside the file.
An optional comment that will be saved inside the file .