skrf.networkSet.NetworkSet.sort¶
- NetworkSet.sort(key=<function NetworkSet.<lambda>>, inplace=True, **kwargs)[source]¶
Sort this network set.
- Parameters
key –
inplace (bool) – Sort the NetworkSet object directly if True, return the sorted NetworkSet if False. Default is True.
**kwargs (dict) – keyword args passed to builtin sorted acting on self.ntwk_set
- Returns
ns
- Return type
None if inplace=True, NetworkSet if False
Examples
>>> ns = rf.NetworkSet.from_dir('mydir') >>> ns.sort()
Sort by other property:
>>> ns.sort(key= lambda x: x.voltage)
Returns a new NetworkSet:
>>> sorted_ns = ns.sort(inplace=False)