Exemplo n.º 1
0
Arquivo: nodes.py Projeto: mgeplf/snap
def _get_population_name(h5_filepath):
    populations = libsonata.NodeStorage(h5_filepath).population_names
    if len(populations) != 1:
        raise BlueSnapError(
            "Only single-population node collections are supported (found: %d)" % len(populations)
        )
    return list(populations)[0]
Exemplo n.º 2
0
Arquivo: nodes.py Projeto: MFSY/snap
 def storage(self):
     """Access to the libsonata node storage."""
     return libsonata.NodeStorage(self._h5_filepath)