Giter Site home page Giter Site logo

Issue with ankab about ahkab HOT 5 CLOSED

ahkab avatar ahkab commented on June 26, 2024
Issue with ankab

from ahkab.

Comments (5)

itdaniher avatar itdaniher commented on June 26, 2024

Hi there!

This looks like a standardish issue with Python 3 - it's generally best practices to set LOCALE/LANG to tell the interpreter your native charset. There's probably a more subtle issue here that relates to how OSX sets up its terminal environment, but if setting LANG addressed your issues then... Keep doing that. I don't have an OSX install to test with, unfortunately.

The other warnings are merely reflective of changes in the matplotlib api I haven't gotten around to sussing out.

Closing for now, please re-open if setting LANG manually didn't do the trick.

from ahkab.

itdaniher avatar itdaniher commented on June 26, 2024

FYI all Linux environments I have access to set LANG for terminal environments at init. Definitely an OSX oddity.

from ahkab.

unnir avatar unnir commented on June 26, 2024

sorry for this follow-up question, do you have any idea why I'm facing this error?

/python3.5/site-packages/ahkab/plotting.py:235: MatplotlibDeprecationWarning: pyplot.hold is deprecated. Future behavior will be consistent with the long-time default: plot commands add elements without first clearing the Axes and/or Figure. pylab.hold(True) /python3.5/site-packages/matplotlib/__init__.py:917: UserWarning: axes.hold is deprecated. Please remove it from your matplotlibrc and/or style files. warnings.warn(self.msg_depr_set % key) /anaconda/lib/python3.5/site-packages/matplotlib/rcsetup.py:152: UserWarning: axes.hold is deprecated, will be removed in 3.0 warnings.warn("axes.hold is deprecated, will be removed in 3.0") /anaconda/lib/python3.5/site-packages/ahkab/plotting.py:248: MatplotlibDeprecationWarning: pyplot.hold is deprecated. Future behavior will be consistent with the long-time default: plot commands add elements without first clearing the Axes and/or Figure. pylab.hold(False)

I'm trying to start the script from the first page:

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

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.)

ac1 = new_ac(.97e3, 1.03e3, 1e2, x0=None)

res = run(cir, ac1)

plot_results('5th order 1kHz Butterworth filter', [('|Vn8|',"")], res['ac'],
             outfilename='bpf_transfer_fn.png')

from ahkab.

itdaniher avatar itdaniher commented on June 26, 2024

Yes - these can be safely ignored. More matplotlib API depreciation warnings that I haven't attended. Just got back from vacation, will probably clean up some of these this week.

These shouldn't impact the functionality of Ahkab at all, but are annoying enough that I'll fix them shortly.

Stay tuned!

from ahkab.

unnir avatar unnir commented on June 26, 2024

thank you, have a nice vacation!

from ahkab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.