If I did this correctly. This is the error I get from the debugger.

error:
-----
*** SyntaxError: can't assign to function call (<stdin>, line 1)

the code I used was:
-----
r,p,z,g,k,ro,gro = var('r,p,z,g,k,ro,gro')
g = 1; k = 1; ro = 1; gro = 1
Psi(r,z) = lambda r,z: ((r*bessel_J(1, g*r))/
(ro*bessel_J(1,gro)))*(cos(k*z))

The psi function is the line of code that has the issue.

The steps I took to use the debugger was:

sage:pdb
Automatic pdb calling has been turned ON
sage: r,p,z,g,k,ro,gro = var('r,p,z,g,k,ro,gro')
sage: g = 1; k = 1; ro = 1; gro = 1
sage: Psi(r,z) = lambda r,z: ((r*bessel_J(1, g*r))/
(ro*bessel_J(1,gro)))*(cos(k*z))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call
last)

/home/nooniensoong97/<ipython console> in <module>()

/home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
i686-Linux/local/lib/python2.6/site-packages/sage/calculus/all.pyc in
symbolic_expression(x)
     94         return vector(SR,x)
     95     else:
---> 96         return SR(x)
     97
     98 import desolvers

/home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
i686-Linux/local/lib/python2.6/site-packages/sage/structure/parent.so
in sage.structure.parent.Parent.__call__ (sage/structure/parent.c:7326)
()

/home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
i686-Linux/local/lib/python2.6/site-packages/sage/structure/
coerce_maps.so in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/
structure/coerce_maps.c:3268)()

/home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
i686-Linux/local/lib/python2.6/site-packages/sage/structure/
coerce_maps.so in
sage.structure.coerce_maps.DefaultConvertMap_unique._call_ (sage/
structure/coerce_maps.c:3171)()

/home/nooniensoong97/programs/sage-4.7.2-linux-32bit-ubuntu_10.04_lts-
i686-Linux/local/lib/python2.6/site-packages/sage/symbolic/ring.so in
sage.symbolic.ring.SymbolicRing._element_constructor_ (sage/symbolic/
ring.cpp:4418)()

TypeError:
> /home/nooniensoong97/ring.pyx(285)sage.symbolic.ring.SymbolicRing._element_constructor_
>  (sage/symbolic/ring.cpp:4418)()


ipdb> Psi(r,z) = lambda r,z: ((r*bessel_J(1, g*r))/
(ro*bessel_J(1,gro)))*(cos(k*z))
*** SyntaxError: can't assign to function call (<stdin>, line 1)


On Jan 21, 1:41 pm, kcrisman <kcris...@gmail.com> wrote:
> On Jan 21, 10:48 am, Eric Kangas <eric.c.kan...@gmail.com> wrote:
>
> > So I take it I am suppose to use debug which should the generate the
> > list.
>
> Sure, use pdb or start Sage with ./sage -gdb if you want.  What I
> meant was for you to post the current session that fails - just post
> exactly what you did all the way up until then.
>
> If you are using the notebook, one way to get at this easily is to
> click the "Edit" button and paste everything from the top until the
> end of the error.  Again, use pastebin.com if it's really long.
>
> If we can't reproduce the error, it's hard to know how to help,
> unfortunately :( but hopefully this will help.
>
> - kcrisman

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to