On Tue, Apr 15, 2008 at 05:01:47PM -0700, [EMAIL PROTECTED] wrote:
> Well, I'm a physicist, too, and I still expect to see f(x,y,z) in that
> order... on the other hand, I also expect f(r, theta, phi) in that
> order, and that breaks all the rules, so your point is well-taken. :)

What about P(x, y, z, T): pressure as a function of position and
temperature?

> > You can use lambdify, but it won't work with numpy arrays if you need
> > functions supporting arrays (eg sin).

> It isn't really the specific application that's the issue/confusion
> here - I'm accustom to using packages like Mathematica and the like
> for symbolic math,

Many physicists use Mathematica to do numerical work, like you seem to be
wanting to do. It is not its core job, but it does it. Same thing with
sympy. We are just all suggesting it is not the best tool avalaible.

> and they have a more unified structure insofar as
> when you write a function, there is a straightforward way to evaluate
> the roots of that function without first converting it to a numerical
> form...

Could you please inform me on the syntax. I have never used mathematica.

> while I do agree with your earlier points, it still seems
> absolutely natural to expect that using the sympy root-finding
> algorithm on a sympy function of one variable should either "just
> work" or at least work in a very simple way ... the next most natural
> solution might be something like:

> >>>f=exp(x*x)*log(x*x)-x
> >>>secant(f.make_callable(['x']),1)

OK, use "lambdaify(f, [x]), as I pointed out in my last message. Appart
from the strange "lambda" name (which sucks bad, because you need a
serious culture in CS to understand what it means), this does what you
want, no? If it doesn't please state what is wrong with it. It is not the
optimal way to do things, as the optimal way to do things is simply not
to use sympy to do numerics.

> Where the make_callable function just generates something with __call__
> where you can specify the order of evaluation with the argument list.
> But maybe that's a feature "to implement."

That feature has been implemented. The one that I want implemented is to
use numpy arrays rather than numbers, but I suspect this doesn't mean
anything to you, because you don't mind using an adjustable spanner to
drive a nail in. Fair enough, as long as you are happy.

Cheers,

Gaƫl

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sympy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to