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
I get this error during run the "hello world" example:
from ahkab import new_ac, run
from ahkab.circuit import Circuit
from ahkab.plotting import plot_results # calls matplotlib for you
import numpy as np
# Define the circuit
cir = Circuit('Butterworth 1kHz band-pass filter')
cir.add_vsource('V1', 'n1', cir.gnd, dc_value=0., ac_value=1.)
cir.add_resistor('R1', 'n1', 'n2', 50.)
cir.add_inductor('L1', 'n2', 'n3', 0.245894)
cir.add_capacitor('C1', 'n3', 'n4', 1.03013e-07)
cir.add_inductor('L2', 'n4', cir.gnd, 9.83652e-05)
cir.add_capacitor('C2', 'n4', cir.gnd, 0.000257513)
cir.add_inductor('L3', 'n4', 'n5', 0.795775)
cir.add_capacitor('C3', 'n5', 'n6', 3.1831e-08)
cir.add_inductor('L4', 'n6', cir.gnd, 9.83652e-05)
cir.add_capacitor('C4', 'n6', cir.gnd, 0.000257513)
cir.add_capacitor('C5', 'n7', 'n8', 1.03013e-07)
cir.add_inductor('L5', 'n6', 'n7', 0.245894)
cir.add_resistor('R2', 'n8', cir.gnd, 50.)
# Define the analysis
ac1 = new_ac(2.*np.pi*.97e3, 2.*np.pi*1.03e3, 1e2, x0=None)
# run it
res = run(cir, ac1)
# plot the results
plot_results('5th order 1kHz Butterworth filter', [('|Vn8|',"")], res['ac'],
outfilename='bpf_transfer_fn.png')
Here is the full error:
Traceback (most recent call last):
File "tlsim\main.py", line 30, in <module>
outfilename='bpf_transfer_fn.png')
File "C:\Users\usr\AppData\Local\Programs\Python\Python37-32\lib\site-packages\ahkab\plotting.py", line 235, in plot_results
pylab.hold(True)
AttributeError: module 'pylab' has no attribute 'hold'
Sys:
Win10
Python 3.7.1
installation:
python -m pip install ahkab[PLOT]
The text was updated successfully, but these errors were encountered:
I get this error during run the "hello world" example:
Here is the full error:
Sys:
installation:
python -m pip install ahkab[PLOT]
The text was updated successfully, but these errors were encountered: