[sympy] Re: generating fortran code for expressions with multiple indices

2010-11-11 Thread Omar Awile
Hi Øyvind Thanks a lot! Indeed that's a dirty hack, but it produces the desired result :) I'd be interested in actually fixing this. So maybe if I take some time to understand how sympy expressions are parsed and how exactly your printing works I could help in finding a good solution for this. Act

Re: [sympy] why do different testing runs give different results

2010-11-11 Thread Aaron Meurer
Well, what does a print statement before the failing line give? I saw something like this once where a test was converting sets to lists, then comparing them, assuming that the ordering would be canonical, at least across runs, but it turned out that it wasn't even that. Actually, did we ever fi

Re: [sympy] Re: generating fortran code for expressions with multiple indices

2010-11-11 Thread Aaron Meurer
On Thu, Nov 11, 2010 at 2:40 AM, Omar Awile wrote: > Hi Øyvind > > Thanks a lot! Indeed that's a dirty hack, but it produces the desired > result :) > I'd be interested in actually fixing this. So maybe if I take some > time to understand how sympy expressions are parsed and how exactly > your pri

[sympy] Re: why do different testing runs give different results

2010-11-11 Thread Vinzent Steinberg
I have to guesses: 1. hashing (like Aaron already mentioned) 2. caching Both are related and responsible for inconsistent results of sympy. Did you try to disable the cache to see if the test passes then? Also, IIRC some tests fail if not executed in correct order (this is bad and why I implemen

[sympy] import sympy imports too much

2010-11-11 Thread Ronan Lamy
Hi all, Running 'python bin/sympy_time.py', I realised that importing sympy pulls in a lot of stuff that are irrelevant to an end user, like pdb, doctest or py.test. Fixing this simply requires removing the imports of runtests and pytest from sympy/utilities/__init.py and importing those modules e

Re: [sympy] import sympy imports too much

2010-11-11 Thread Ondrej Certik
On Thu, Nov 11, 2010 at 11:59 AM, Ronan Lamy wrote: > Hi all, > > Running 'python bin/sympy_time.py', I realised that importing sympy > pulls in a lot of stuff that are irrelevant to an end user, like pdb, > doctest or py.test. Fixing this simply requires removing the imports of > runtests and pyt

Re: [sympy] import sympy imports too much

2010-11-11 Thread Aaron Meurer
How difficult would it be to provide a model like Maple, where the common functions are imported by default, but if you want more advanced things you have to import the module? The difficulty, the common functions and more advanced ones might be in the same file. So, for example, you might want to

Re: [sympy] import sympy imports too much

2010-11-11 Thread Aaron Meurer
Also, I think we could probably stop importing stuff from utilities by default, if that helps. Aaron Meurer On Thu, Nov 11, 2010 at 2:08 PM, Aaron Meurer wrote: > How difficult would it be to provide a model like Maple, where the > common functions are imported by default, but if you want more >

Re: [sympy] import sympy imports too much

2010-11-11 Thread Ondrej Certik
On Thu, Nov 11, 2010 at 1:08 PM, Aaron Meurer wrote: > How difficult would it be to provide a model like Maple, where the > common functions are imported by default, but if you want more > advanced things you have to import the module?  The difficulty, the > common functions and more advanced ones

Re: [sympy] import sympy imports too much

2010-11-11 Thread Ondrej Certik
On Thu, Nov 11, 2010 at 2:44 PM, Ondrej Certik wrote: > On Thu, Nov 11, 2010 at 1:08 PM, Aaron Meurer wrote: >> How difficult would it be to provide a model like Maple, where the >> common functions are imported by default, but if you want more >> advanced things you have to import the module?  T

Re: [sympy] import sympy imports too much

2010-11-11 Thread Ronan Lamy
Le jeudi 11 novembre 2010 à 12:08 -0800, Ondrej Certik a écrit : > On Thu, Nov 11, 2010 at 11:59 AM, Ronan Lamy wrote: > > Hi all, > > > > Running 'python bin/sympy_time.py', I realised that importing sympy > > pulls in a lot of stuff that are irrelevant to an end user, like pdb, > > doctest or py

[sympy] divisors poor performance--any ideas why?

2010-11-11 Thread smichr
I've been discussing a problem with someone on the tutor list. It has to do with computing the sum of the proper divisors of a number. I suggested that he check out the sympy ntheory module. He did and is getting dismal results that are very different from mine. Does anyone have an idea what the pr