I tried the web examples you show (only one per page) but everything
works. I am with sagemath 8.1 beta8, I am not going to try all, but I
think you have a problem with your sage installation, how did you get it ?
I am running xenial and I installed
sudo add-apt-repository ppa:chronitis/jupyter
To get all widgets, there though a problem because sagemath installation is
7.5.1, but as I said I compiled sage-develop version
regards
Henri
Le 22/10/2017 Γ 05:18, Andy Howell a Γ©critΒ :
I'm trying to learn how to use the @interact command.
The examples
here:Β http://doc.sagemath.org/html/en/prep/Quickstarts/Interact.html
do not work. I get a stack traces complaining about variable types etc.
Other examples I tried:
https://wiki.sagemath.org/interact/calculus#Some_polar_parametric_curves
With that I get:
πΈππππππππππππππππππ<πππππππππππππππΆπ‘π½ππππΉπΌππΆπΎπππΎ>π ππππ»π ππππππππ·:π΄ππππππ‘π(πππππ=π'ππππππ:π½πππ[π·β―β―|πΈ|β―β―β―π»]',πππππππππππ=π'ππ·')ππΈ:π΄ππππππ‘π(πππππ=π'ππππππ:π½πππ[π·β―β―|πΉ|β―β―β―π»]',πππππππππππ=π'ππΈ')ππ·:π΄ππππππ‘π(πππππ=π'ππππππ:π½πππ[π·β―β―|πΌ/π»|β―β―β―π·πΆ]',πππππππππππ=π'ππ·')ππΈ:π΄ππππππ‘π(πππππ=π'ππππππ:π½πππ[π·β―β―|πΌ|β―β―β―π·πΆ]',πππππππππππ=π'ππΈ')π:π΄ππππππ‘π(πππππ=π'ππππππ:π½πππ[πΆβ―β―|πΆ|β―β―β―πΈ]',πππππππππππ=π'π')
TypeErrorΒ Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Β Traceback (most recent call
last)
<ipython-input-105-fc4092c2f8fe> in <module>()
Β Β Β 6Β Β Β show(p, figsize = [Integer(5),Integer(5)], xmin =
-Integer(2)-b, xmax = Integer(2)+b, ymin = -Integer(2)-b, ymax =
Integer(2)+b, axes = False)
Β Β Β 7
----> 8 para()
<ipython-input-105-fc4092c2f8fe> in para(n1, n2, a1, a2, b)
Β Β Β 2 def para(n1 = slider(Integer(1),Integer(5),Integer(1),default
= Integer(2)), n2 = slider(Integer(1),Integer(5),Integer(1),default =
Integer(3)), a1 =
slider(Integer(1),Integer(10),Integer(1)/Integer(10),Integer(6)/Integer(5)),
a2 = slider(Integer(1),Integer(10),Integer(1)/Integer(10),Integer(6)),
b = slider(Integer(0),Integer(2),Integer(1)/Integer(50),Integer(0))):
Β Β Β 3Β Β Β var('t')
----> 4Β Β Β pretty_print(html('$r=' + latex(b+sin(a1*t)**n1 +
cos(a2*t)**n2)+'$'))
Β Β Β 5Β Β Β p = parametric_plot((cos(t)*(b+sin(a1*t)**n1 +
cos(a2*t)**n2), sin(t)*(b+sin(a1*t)**n1 + cos(a2*t)**n2)),
(t,Integer(0), Integer(20)*pi), plot_points = Integer(1024), rgbcolor
= (Integer(0),Integer(0),Integer(0)))
Β Β Β 6Β Β Β show(p, figsize = [Integer(5),Integer(5)], xmin =
-Integer(2)-b, xmax = Integer(2)+b, ymin = -Integer(2)-b, ymax =
Integer(2)+b, axes = False)
TypeError: unsupported operand type(s) for *: 'instance' and
'sage.symbolic.expression.Expression'
Any hints on how to make this work?
Thanks,
Andy
--
You received this message because you are subscribed to the Google
Groups "sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to sage-support+unsubscr...@googlegroups.com
<mailto:sage-support+unsubscr...@googlegroups.com>.
To post to this group, send email to sage-support@googlegroups.com
<mailto:sage-support@googlegroups.com>.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.