- 
                Notifications
    
You must be signed in to change notification settings  - Fork 197
 
Open
Description
Environment (OS, Python version, PySpice version, simulator)
macOS 13.5, Python 3.12.2, PySpice 1.5, ngspice-42
I am simulating very large circuits that can take many minutes to solve.
For this reason I would like to be able to save the analysis object, so I do not have to recalculate it.
How can I save the analysis object to disk?
Pickle does not work
cir = Circuit(net)
simulator = cir.simulator(temperature=25, nominal_temperature=25)
result = simulator.dc(Vin=slice(-1, 2, 0.01))
import pickle
with open("result.obj", "wb") as f:
    pickle.dump(result, f)  # <-- this line crashesThe pickle fails,
Traceback (most recent call last):
  File "<snip>.py", line <snip>, in <module>
    pickle.dump(result, f)
TypeError: cannot pickle '_cffi_backend.__CDataOwn' object
Is there another way to export this object and save the data that you can recommend?
Metadata
Metadata
Assignees
Labels
No labels