skrf.network.Network.func_on_parameter

Network.func_on_parameter(func, attr='s', *args, **kwargs)

Aplies a function parameter matrix, one frequency slice at a time

This is useful for functions that can only operate on 2d arrays, like numpy.linalg.inv. This loops over f and calls func(ntwkA.s[f,:,:], *args, **kwargs)

Parameters :

func : func

function to apply to s-parameters, on a single-freqency slice. (ie func(ntwkA.s[0,:,:], *args, **kwargs)

*args, **kwargs : :

passed to the func

Examples

>>> from numpy.linalg import inv
>>> ntwk.func_on_parameter(inv)

Previous topic

skrf.network.Network.flip

Next topic

skrf.network.Network.interpolate

This Page