> > 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.
>
> Do not use 'Psi(r,z) = ...', just use 'Psi = ...'. Such as:
>
> r,p,z,g,k,ro,gro = var('r,p,z,g,k,ro,gro')
> g = 1; k = 1; ro = 1; gro = 1
> Psi = lambda r,z: ((r*bessel_J(1, g*r))/ (ro*bessel_J(1,gro)))*(cos(k*z))
>

Great point, Renan.

The basic reason is that `Psi(r,z)` creates a symbolic "callable"
function, so all of its components need to be symbolic Sage
functions.  But lambda is (by definition) a Python non-symbolic
"regular" function, so you can't combine those notations.

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