On Mar 11, 2009, at 4:56 AM, Mani chandra wrote:
>
> Hi,
>
> The following function gives me an error.
>
> def test(l, r):
>return complex(0, 1)**l*spherical_bessel_J(l, r)
[...]
>
> TypeError: unsupported operand parent(s) for '*': ' 'complex'>' and
> 'Symbolic Ring'
>
>
On Mar 11, 10:47 am, Mani chandra wrote:
> Also I tried some basic stuff with "I" and it doesn't seem to be working.
>
> sage: exp(I).real
>
Sage prefers methods to properties:
sage: exp(I).real()
cos(1)
Using
z = exp(I*r*cos(theta)).real()
makes your parametric_plot3d work, too.
Carl
--~
Simon King wrote:
> Dear Mani chandra,
>
> something really weird seems to be going on. This is a fresh session
> of Sage 3.3:
>
> sage: complex(0,1)*spherical_bessel_J(1,1)
> ---
> TypeError Tr
Dear Mani chandra,
something really weird seems to be going on. This is a fresh session
of Sage 3.3:
sage: complex(0,1)*spherical_bessel_J(1,1)
---
TypeError Traceback (most recent call
last)