Comments (3)
Will this help ? I think there is already a built-in function for your request.
Also, should this be in the
Discussion
thread rather thanIssues
? 🤔 We can always convert Discussions to Issues once it is confirmedLines 5442 to 5480 in b32ff9c
Thanks for your tip, your reply solved my problem very well
from scikit-rf.
An ugly attempt to achieve this
def renumbered(self, from_ports: Sequence[int], to_ports: Sequence[int] = None) -> 'Network':
"""
Return a renumbered Network, leave self alone.
Parameters
----------
from_ports : list-like
List of port indices to change. Size between 1 and N_ports.
to_ports : can be None or list-like
List of desired port indices. Size between 1 and N_ports.
None to use automatically generate a List of desired port indices. Size is between 1 and from_ports' size.
NB: from_ports and to_ports must have same size.
Returns
-------
ntwk : :class:`Network` object
Resulting renumbered Network
See Also
--------
renumber
flip
flipped
"""
out = self.copy()
if to_ports:
out.renumber(from_ports, to_ports)
else:
to_ports_idx = npy.ix_(npy.arange(out.s.shape[0], from_ports, from_ports)
out.s = out.s[to_ports_idx]
out.z0 = out.z0[:, from_ports]
return out
from scikit-rf.
Will this help ? I think there is already a built-in function for your request.
Also, should this be in the Discussion
thread rather than Issues
? 🤔
We can always convert Discussions to Issues once it is confirmed
Lines 5442 to 5480 in b32ff9c
from scikit-rf.
Related Issues (20)
- Uncertainties in Vector Fitting fit parameters HOT 11
- vector fit crashes when npoles >= npoints/2 HOT 3
- some observations about vectorfit operation
- Tests are failing HOT 11
- add statics function i.e. violin plots for a number of sample measurements HOT 1
- Analytical Matrix Inversion in subnetwork growth (Filipsson/Compton) vs General Numerical Inversion following Hallbjörner HOT 9
- De-embedding procedure help request HOT 3
- Trying to use pre-commit, doesn't like the .pre-commit-config.yaml regex. HOT 3
- S-parameter calculation incorrect for 3-port circuit HOT 46
- Required keyword argument names HOT 2
- z2s with Complex Reference Impedance HOT 2
- One possible idea to speed up the C attribute of Circuit class HOT 3
- darwin aarch64 skrf/calibration/tests/test_calibration.py failing with divide by zero (determinate calculations) HOT 4
- How to release Network object ? HOT 2
- Relation of Z-Parameters to Y-Parameters: To be, or not to be HOT 6
- scikit-rf port to .Net C#. Help Needed! HOT 3
- Google Group "scikit-rf" still exists and is full of spam HOT 3
- PR Labeler does not work HOT 1
- skrf.NetworkSet.interpolate_from_params raises exception if any identical parameter values are in a network set where as skrf.NetworkSet.interpolate_from_network using the same parameters does not. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from scikit-rf.