-
-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve performance network.copy #875
Improve performance network.copy #875
Conversation
I guess that, originally, the |
I added test cased to cover this |
Just thinking loud.... |
You're right, was supposed to be done in #700. But it seems that changing an element of the array is still possible, as done in the test of this PR. |
The |
@FranzForstmayr @jhillairet I think this PR is ready. The Frequency is not immutable right now, and will not be during some deprecation time. |
Thank you, I'm fine with this change 👍🏻 |
Thanks! |
The
network.copy
makes a deep copy of the frequency object, and this copy happens again in theNetwork
constructor.This PR removes the explicit copy of the frequency object and adds a test.
Note: are the copies at https://github.com/scikit-rf/scikit-rf/blob/master/skrf/calibration/calibration.py#L245 required? If not, we could remove them as well