skrf.network.Network.write

Network.write(file=None, *args, **kwargs)

Write the Network to disk using the pickle module.

The resultant file can be read either by using the Networks constructor, __init__() , the read method read(), or the general read function skrf.io.general.read()

Parameters :

file : str or file-object

filename or a file-object. If left as None then the filename will be set to Network.name, if its not None. If both are None, ValueError is raised.

*args, **kwargs : :

passed through to write()

See also

skrf.io.general.write
write any skrf object
skrf.io.general.read
read any skrf object

Notes

If the self.name is not None and file is can left as None and the resultant file will have the .ntwk extension appended to the filename.

Examples

>>> n = rf.N(f=[1,2,3],s=[1,1,1],z0=50, name = 'open')
>>> n.write()
>>> n2 = rf.read('open.ntwk')

Previous topic

skrf.network.Network.resample

Next topic

skrf.network.Network.write_touchstone

This Page