Here's an example that may be of interest that uses Sympy in the context of
a scientific application.
This Jupyter notebook derives the defining equations for cubic spline
coefficients (in tridiagonal matrix form), substitutes those equations into
those for a tridiagonal solver (not derived,
LLVMPY. However,
> the LLVM project itself is a fast moving project, the interfaces keep
> changing. It is hard to maintain the corresponding Python interface and
> this is also why llvmlite is designed in its way.
> By the way, I'd like to see your code for array evaluation in
I think these are good directions. I also think they should be driven by
strong examples (the PyDy example in your repo is good, I see the paper has
some others), because that will affect the API.
For vectorized evaluation, array data can be stored in different ways, and
this affects the
Currently there exists Lambda, which supports modeling a single expression
( and lambdify, which converts a single expression to Python). It would be
useful to have something similar for a sequence of statements. This is
called a 'procedure' in Cohen's book (Computer Algebra and Symbol
I would like to write an expression using Matrix symbols, and then evaluate
it by substituting concrete Matrix values. However, the resulting Matrix
expression will not simplify.
# set up general expression
n = Symbol('n')
r1 = MatrixSymbol('r1',n,1)
r2 = MatrixSymbol('r2',n,1)
d = r2 - r1
#
:
Is this the code that lets you type (x + 1).match((Add, (Symbol, Number)))
(or something like that)?
Could give a summary of the functionality? Perhaps it should be integrated
into the main matcher.
Aaron
On Friday, September 9, 2011, Mark Dewing wrote:
Dimas,
The pattern matching code
Dimas,
The pattern matching code I've been working on might be useful to
compactly represent this sort of transformation.
The code is here:
https://github.com/markdewing/sympy/blob/derivation_modeling/sympy/prototype/codegen/pattern_match.py
Example of it in use is here (converting to a
of us gave a lighting talk about SymPy. I talked about SymPy
Live and App Engine, and Aaron gave a talk about Risch algorithm (@Aaron:
can you put a link to your presentation here or add it to SymPy
Presentations?).
I forgot to mention that today there was also a talk due to Mark Dewing
about
As a part of trying to understand how to create scientific programs
assisted by sympy, I've made a computer model of derivations, so each
step could be checked by sympy.
Finally I have a simple example using the configurational integral in
statistical mechanics. It starts from the general
The current method for transforming sympy trees (used in the
printers, for example) can require some nested if-tests, even for some
simple cases like subtraction (addition of -1 multiplied by the first
arg), or division (mutiply by arg to the power of -1).
It would be nice to be able to
Here's a first pass at replacing the tuple in the Sum/Integral limits
with Tuple.
http://github.com/markdewing/sympy/tree/limit-tuple
All the tests pass, but I didn't try it beyond the set of tests.
--
You received this message because you are subscribed to the Google Groups
sympy group.
To
Is there a reason that limits for sums and integrals are stored
differently?
For integrals, it appears to be (variable, (lower_limit, upper_limit))
and for sums it appears to be (variable, lower_limit, upper_limit)
--
You received this message because you are subscribed to the Google Groups
Attached is a simple class for modeling the derivation of the Euler method
for solving a first order ODE. (Mostly because it's one of the easiest
algorithms to start with)
Running it outputs all the steps:
D(f(x), x) == 2*x
(f_1 - f_0)/h == 2*x Approximate derivative with finite difference
f_1 -
, split, or
otherwise transformed?
3. Is adding extra memory usage to the nodes a problem?
On Jun 8, 3:27 am, Ondrej Certik [EMAIL PROTECTED] wrote:
On Sun, Jun 8, 2008 at 6:13 AM, Mark Dewing [EMAIL PROTECTED] wrote:
Several expression forms seem be reduced to a canonical form (both
Several expression forms seem be reduced to a canonical form (both in
the representation and in the pretty printed output). Examples:
1. Factorial vs. Gamma function
2. Sqrt(radical) vs. a**(1/2)
Is there any way to control what form is used?
Another case, (i*j)**(1/2) is represented as
Here's a use for sympy that I thought might be interesting to the
list.
Sympy computes derivatives that are then used in generated python
code.
The code generation code is located here
https://quameon.svn.sourceforge.net/svnroot/quameon/trunk/codegen/
In particular, lang_py.py defines nodes
16 matches
Mail list logo