Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In the second example function, you are returning a from the innermost loop, but a is a symbolic expression. In the first example, what you return from the innermost loop is just a number evaluated at theta and phi. What happens if you instead use return a.subs(theta=theta, phi=phi) in the second example?