You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At present, copying a network with pypsa.Network().copy() takes a surprisingly long time. For some workflows this actually seems to be a performance bottleneck.
I noticed that using the builtin copy.deepcopy seems to do the same job much faster:
importpypsaimportcopyn=pypsa.examples.ac_dc_meshed()
n2=n.copy() # takes about 158msn3=copy.deepcopy(n) # takes about 5 ms
Would this be a suitable alternative implementation? Are there any issues with using copy.deepcopy?
I can look into making a PR if that would be of interest.
The text was updated successfully, but these errors were encountered:
At present, copying a network with
pypsa.Network().copy()
takes a surprisingly long time. For some workflows this actually seems to be a performance bottleneck.I noticed that using the builtin
copy.deepcopy
seems to do the same job much faster:Would this be a suitable alternative implementation? Are there any issues with using
copy.deepcopy
?I can look into making a PR if that would be of interest.
The text was updated successfully, but these errors were encountered: