nir.serialization
#
Module Contents#
Functions#
|
|
|
Read a graph from a HDF/conn5 file. |
|
|
|
Load a NIR from a HDF/conn5 file. |
|
Reads the filename of a given NIR file, and raises an exception if the version |
|
Write a NIR to a HDF5 file. |
- nir.serialization.try_byte_to_str(a: Union[bytes, Any]) Union[str, Any] #
- Parameters
a (Union[bytes, Any]) –
- Return type
Union[str, Any]
- nir.serialization.read_node(node: Any) nir.NIRNode #
Read a graph from a HDF/conn5 file.
- Parameters
node (Any) –
- Return type
- nir.serialization.hdf2dict(node: Any) Dict[str, Any] #
- Parameters
node (Any) –
- Return type
Dict[str, Any]
- nir.serialization.read(filename: Union[str, pathlib.Path]) nir.NIRGraph #
Load a NIR from a HDF/conn5 file.
- Parameters
filename (Union[str, pathlib.Path]) –
- Return type
- nir.serialization.read_version(filename: Union[str, pathlib.Path]) str #
Reads the filename of a given NIR file, and raises an exception if the version does not exist in the file.
- Parameters
filename (Union[str, pathlib.Path]) –
- Return type
str
- nir.serialization.write(filename: Union[str, pathlib.Path, io.RawIOBase], graph: nir.NIRNode) None #
Write a NIR to a HDF5 file.
- Parameters
filename (Union[str, pathlib.Path, io.RawIOBase]) –
graph (nir.NIRNode) –
- Return type
None