You'll have to time this to see if it's faster than our
recurrence_memo. recurrence_memo might be faster because it uses the
fact that the inputs are 0, 1, 2, ..., so it's just indexing a list
rather than using a dictionary lookup.
Aaron Meurer
On Thu, Sep 6, 2012 at 9:36 AM, smichr wrote:
> Ju
On Fri, Sep 7, 2012 at 1:40 AM, Larry Wigton wrote:
> Python code using cse from sympy:
>
> from sympy import *
> x=Symbol('x')
> y=Symbol('y')
> eq1 = 5*x**3*y**2 + y**3
> eq2 = 4*x**2*y**3 + y**2
> eq = [eq1,eq2]
> print eq
> (red,rep) = cse(eq)
> print red
> print rep
> eq = [eq2,eq1]
> print e
Python code using cse from sympy:
from sympy import *
x=Symbol('x')
y=Symbol('y')
eq1 = 5*x**3*y**2 + y**3
eq2 = 4*x**2*y**3 + y**2
eq = [eq1,eq2]
print eq
(red,rep) = cse(eq)
print red
print rep
eq = [eq2,eq1]
print eq
(red,rep) = cse(eq)
print red
print rep
*
OK. Thanks for the quick reply.
I'll try installing the development version and come back here if I have
more issue.
--Marc
On Thursday, September 6, 2012 2:20:54 PM UTC-4, Aaron Meurer wrote:
>
> When something like this happens, it's a bug. Everything in SymPy
> should work just the same if
When something like this happens, it's a bug. Everything in SymPy
should work just the same if you swap out different names for symbols,
with the exception that some things might be ordered differently.
In this case, it looks like the bug has already been fixed, so it
should work just fine in the
Hi,
I found an integral that sometimes fails, sometime succeeds depending on
the variable name. See the session below.
How can I avoid such unexpected behavior?
This is with SymPy 0.7.1 on windows.
Thanks in advance.
IPython console for SymPy 0.7.1 (Python 2.7.2-32-bit) (ground types: python)
Just happened across a recent post that might be worth checking out for
those that appreciate and can evaluate these things:
http://code.activestate.com/recipes/578231-probably-the-fastest-memoization-decorator-in-the-/
--
You received this message because you are subscribed to the Google Group