-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
getattr in thinkplot.py Config #26
Comments
Thanks for reporting this. I'll investigate as soon as I get a change.
Can you tell me what parameters you are passing to Config?
…On Fri, Feb 24, 2017 at 12:35 PM, George Fisher ***@***.***> wrote:
I am using your notebooks with Jupyter 4.2.1 and Python 3.5.2
The code snippet
def Config(**options):
for name in names:
if name in options:
getattr(pyplot, name)(options[name])
generates TypeError: 'tuple' object is not callable
The following seems to fix it for me
def Config(**options):
for name in names:
if name in options:
try:
getattr(pyplot, name)(options[name])
except TypeError:
setattr(pyplot, name, options[name])
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#26>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABy37UBuTT_HQLP54LKgOXBMYxy3KzzDks5rfxTigaJpZM4MLeY3>
.
|
http://localhost:8888/notebooks/code/chap02.ipynb
|
Huh. I can't replicate that.
Just for debugging purposes, would you clone a fresh copy of the repo and
run that notebook again?
…On Fri, Feb 24, 2017 at 1:33 PM, George Fisher ***@***.***> wrote:
http://localhost:8888/notebooks/code/chap02.ipynb
signal = thinkdsp.SquareSignal(100)
duration = signal.period*3
segment = signal.make_wave(duration, framerate=10000)
segment.plot()
thinkplot.config(ylim=[-1.05, 1.05], legend=False)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#26 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABy37bdK9UADzXMEYV-9qGBM7e1nmwlXks5rfyKOgaJpZM4MLeY3>
.
|
OK. Started fresh and it does not recur. |
Good news. Thanks for following up. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using your notebooks with Jupyter 4.2.1 and Python 3.5.2 under Ubuntu Desktop 16.10
The code snippet
generates TypeError: 'tuple' object is not callable
The following seems to fix it for me
The text was updated successfully, but these errors were encountered: