Re: sympy

2016-03-31 Thread Oscar Benjamin
On 31 March 2016 at 22:33, Poul Riis wrote: > Den onsdag den 30. marts 2016 kl. 13.17.33 UTC+2 skrev Poul Riis: >> Is it possible to transfer results from sympy to 'normal' python. >> >> In the case below I think my intention is clear enough but it does not work >> as intended. How can it be done

Re: sympy

2016-03-31 Thread Poul Riis
Den onsdag den 30. marts 2016 kl. 13.17.33 UTC+2 skrev Poul Riis: > Is it possible to transfer results from sympy to 'normal' python. > > In the case below I think my intention is clear enough but it does not work > as intended. How can it be done? > > Poul Riis > > > > > from sympy import *

Re: sympy

2016-03-31 Thread Oscar Benjamin
On 31 March 2016 at 11:57, Poul Riis wrote: > > ... However, the sympy way seems to be about 70 times slower than using the > derivative calculated 'by hand' (try the example below). > Can it be done in a more efficient way? > > Poul Riis > > > > from sympy import * > from time import * > x=Symbo

Re: sympy

2016-03-31 Thread Peter Otten
Chris Angelico wrote: > On Fri, Apr 1, 2016 at 1:55 AM, Peter Otten <__pete...@web.de> wrote: >> Hm, the two functions fmsympy() and fm() do not return the same value: >> >> $ python -i sympy_diff.py >> 1 evaluations with sympy : dt1 = 0.7178411483764648 >> 1 evaluations without sympy:

Re: sympy

2016-03-31 Thread Chris Angelico
On Fri, Apr 1, 2016 at 1:55 AM, Peter Otten <__pete...@web.de> wrote: > Hm, the two functions fmsympy() and fm() do not return the same value: > > $ python -i sympy_diff.py > 1 evaluations with sympy : dt1 = 0.7178411483764648 > 1 evaluations without sympy: dt2 = 0.10177111625671387 >>>

Re: sympy

2016-03-31 Thread Peter Otten
Poul Riis wrote: > Den onsdag den 30. marts 2016 kl. 17.59.49 UTC+2 skrev Steven D'Aprano: >> On Thu, 31 Mar 2016 02:23 am, Poul Riis wrote: >> >> > What I intend to do is to let sympy find the derivative of some >> > welldefined function and next define the foundation derivative as a >> > normal

Re: sympy

2016-03-31 Thread Poul Riis
Den onsdag den 30. marts 2016 kl. 17.59.49 UTC+2 skrev Steven D'Aprano: > On Thu, 31 Mar 2016 02:23 am, Poul Riis wrote: > > > What I intend to do is to let sympy find the derivative of some > > welldefined function and next define the foundation derivative as a normal > > function so that I can c

Re: sympy

2016-03-30 Thread Poul Riis
Den torsdag den 31. marts 2016 kl. 06.49.34 UTC+2 skrev Gregory Ewing: > Steven D'Aprano wrote: > > On Thu, 31 Mar 2016 02:23 am, Poul Riis wrote: > > > >>What I intend to do is to let sympy find the derivative of some > >>welldefined function and next define the foundation derivative as a normal

Re: sympy

2016-03-30 Thread Gregory Ewing
Steven D'Aprano wrote: On Thu, 31 Mar 2016 02:23 am, Poul Riis wrote: What I intend to do is to let sympy find the derivative of some welldefined function and next define the foundation derivative as a normal function py> ftext.evalf(subs={x:3}) -0.0600 Given all that, it looks

Re: sympy

2016-03-30 Thread Steven D'Aprano
On Thu, 31 Mar 2016 02:23 am, Poul Riis wrote: > What I intend to do is to let sympy find the derivative of some > welldefined function and next define the foundation derivative as a normal > function so that I can calculate numerical values or even make a graph. I'm glad you explained what you

Re: sympy

2016-03-30 Thread Robert Kern
On 2016-03-30 16:23, Poul Riis wrote: What I intend to do is to let sympy find the derivative of some welldefined function and next define the foundation derivative as a normal function so that I can calculate numerical values or even make a graph. http://docs.sympy.org/dev/modules/utilities/

Re: sympy

2016-03-30 Thread Poul Riis
What I intend to do is to let sympy find the derivative of some welldefined function and next define the foundation derivative as a normal function so that I can calculate numerical values or even make a graph. -- https://mail.python.org/mailman/listinfo/python-list

Re: sympy

2016-03-30 Thread Steven D'Aprano
On Wed, 30 Mar 2016 10:17 pm, Poul Riis wrote: > Is it possible to transfer results from sympy to 'normal' python. > > In the case below I think my intention is clear enough but it does not > work as intended. How can it be done? How can what be done? Unfortunately, we're not able to read your m

Re: sympy

2016-03-30 Thread Ned Batchelder
On Wednesday, March 30, 2016 at 7:17:33 AM UTC-4, Poul Riis wrote: > Is it possible to transfer results from sympy to 'normal' python. Poul, welcome to the group. > In the case below I think my intention is clear enough but it does not work > as intended. How can it be done? > > from sympy impo

Re: sympy

2016-03-30 Thread Ben Finney
Poul Riis writes: > Is it possible to transfer results from sympy to 'normal' python. Is Sympy not “normal Python”? What transfer are you intending? > In the case below I think my intention is clear enough but it does not > work as intended. How can it be done? First: no, your intention is not

Re: sympy returns a dictionary sometimes, and sometimes a list of tuples...why?

2009-09-30 Thread Robert Kern
Brian Blais wrote: Hello, I wrote a very simple script using sympy, and things were working fine, except for one problem. So I have: You will probably want to ask on the sympy mailing list: http://groups.google.com/group/sympy from sympy import * x, y = symbols('x','y',real=True) alpha

Re: sympy: what's wrong with this picture?

2008-03-05 Thread Nanjundi
On Mar 5, 3:34 pm, Mensanator <[EMAIL PROTECTED]> wrote: > On Mar 5, 9:29 am, Nanjundi <[EMAIL PROTECTED]> wrote: > > > On Mar 4, 3:13 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > On Mar 4, 12:32 pm, Nanjundi <[EMAIL PROTECTED]> wrote: > > > > > Does seeding ( random.seed ) random with time fi

Re: sympy: what's wrong with this picture?

2008-03-05 Thread Mensanator
On Mar 5, 9:29 am, Nanjundi <[EMAIL PROTECTED]> wrote: > On Mar 4, 3:13 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > On Mar 4, 12:32 pm, Nanjundi <[EMAIL PROTECTED]> wrote: > > > > Does seeding ( random.seed ) random with time fix this? It should. > > > I suppose that depends on how long it take

Re: sympy: what's wrong with this picture?

2008-03-05 Thread Nanjundi
On Mar 4, 3:13 pm, Mensanator <[EMAIL PROTECTED]> wrote: > On Mar 4, 12:32 pm, Nanjundi <[EMAIL PROTECTED]> wrote: > > > > Does seeding ( random.seed ) random with time fix this? It should. > > I suppose that depends on how long it takes factorint() to > process a number. If the seed is reset befor

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Mensanator
On Mar 4, 4:40 pm, Mensanator <[EMAIL PROTECTED]> wrote: > On Mar 4, 3:00 pm, Istvan Albert <[EMAIL PROTECTED]> wrote: > > > On Mar 4, 3:13 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > But what if _I_ wanted to make a repeatable sequence for test > > > purposes? Wouldn't factorint() destroy my

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Mensanator
On Mar 4, 3:00 pm, Istvan Albert <[EMAIL PROTECTED]> wrote: > On Mar 4, 3:13 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > But what if _I_ wanted to make a repeatable sequence for test > > purposes? Wouldn't factorint() destroy my attempt by reseeding > > on every call? > > Would it? I don't kno

Re: sympy: what's wrong with this picture?

2008-03-04 Thread bearophileHUGS
apatheticagnostic: > I swear, this is one of the most polite-oriented groups I've ever > seen. > Not that that's a bad thing or anything, it's nice to be nice. Yep, and with lot more work it may even become a bit fit for women/ females too. Bye, bearophile -- http://mail.python.org/mailman/listi

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Istvan Albert
On Mar 4, 3:13 pm, Mensanator <[EMAIL PROTECTED]> wrote: > But what if _I_ wanted to make a repeatable sequence for test > purposes? Wouldn't factorint() destroy my attempt by reseeding > on every call? Would it? It may just be that you are now itching to see a problem even where there isn't one

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Mensanator
On Mar 4, 12:32 pm, Nanjundi <[EMAIL PROTECTED]> wrote: > On Mar 3, 3:40 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > > > > Notice anything funny about the "random" choices? > > > import sympy > > import time > > import random > > > f = [i for i in sympy.primerange(1000,1)] > > > for i in

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Mensanator
On Mar 4, 10:50 am, Lie <[EMAIL PROTECTED]> wrote: > On Mar 4, 1:12 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > > > > On Mar 3, 11:58 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote: > > > > Mensanator wrote: > > > > While we're on the subject of English, the word "worthless" > > > > means "ha

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Mensanator
On Mar 4, 2:44 am, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > On Mar 3, 11:58 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote: > >> Mensanator wrote: > >>> I'm not hard to please at all. > >> No, of course not, since logically you must think all software is useless. > > > So

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Nanjundi
On Mar 3, 3:40 pm, Mensanator <[EMAIL PROTECTED]> wrote: > Notice anything funny about the "random" choices? > > import sympy > import time > import random > > f = [i for i in sympy.primerange(1000,1)] > > for i in xrange(10): > f1 = random.choice(f) > print f1, > f2 = random.choice(f) >

Re: sympy: what's wrong with this picture?

2008-03-04 Thread castironpi
On Mar 4, 10:50 am, Lie <[EMAIL PROTECTED]> wrote: > On Mar 4, 1:12 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > > > > On Mar 3, 11:58 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote: > > > > Mensanator wrote: > > > > While we're on the subject of English, the word "worthless" > > > > means "ha

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Lie
On Mar 4, 1:12 pm, Mensanator <[EMAIL PROTECTED]> wrote: > On Mar 3, 11:58 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote: > > > Mensanator wrote: > > > While we're on the subject of English, the word "worthless" > > > means "has no value". So, a program that doesn't work would > > > generally be "

Re: sympy: what's wrong with this picture?

2008-03-04 Thread Erik Max Francis
Mensanator wrote: > On Mar 3, 11:58 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote: >> Mensanator wrote: >>> I'm not hard to please at all. >> No, of course not, since logically you must think all software is useless. > > Somehow, I expected better logic from people who call themselves > programm

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Mensanator
On Mar 3, 11:58 pm, Erik Max Francis <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > While we're on the subject of English, the word "worthless" > > means "has no value". So, a program that doesn't work would > > generally be "worthless". One that not only doesn't work but > > creates side effec

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Mensanator
On Mar 3, 8:31 pm, [EMAIL PROTECTED] wrote: > > All software has bugs. > > Good software has bugs. > > Therefore, good software is software. > > > This makes sympy worse than worthless, as it f***s up other modules. > > What is it still good for? Lots. The problem is when the total is less than th

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Erik Max Francis
Mensanator wrote: > While we're on the subject of English, the word "worthless" > means "has no value". So, a program that doesn't work would > generally be "worthless". One that not only doesn't work but > creates side effects that cause other programs to not work > (which don't have bugs) would

Re: sympy: what's wrong with this picture?

2008-03-03 Thread castironpi
> All software has bugs. > Good software has bugs. Therefore, good software is software. > This makes sympy worse than worthless, as it f***s up other modules. What is it still good for? -- http://mail.python.org/mailman/listinfo/python-list

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Mensanator
On Mar 3, 6:49 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > On Mar 3, 4:53 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > >> 3. You must be terribly naive if you expect a freeware program with a > >> version number of 0.5.12 not to have bugs > > > No, but I guess I'm naive thinki

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Mensanator
On Mar 3, 6:21 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > On Mar 3, 4:08 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > >> Mensanator wrote: > >>> On Mar 3, 2:49 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > It's just a bug--probably sympy is messing with the internals of t

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Robert Kern
Mensanator wrote: > On Mar 3, 4:53 pm, Carl Banks <[EMAIL PROTECTED]> wrote: >> 3. You must be terribly naive if you expect a freeware program with a >> version number of 0.5.12 not to have bugs > > No, but I guess I'm naive thinking that when someone posts a link to > such a program that he's re

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Carl Banks
On Mar 3, 7:24 pm, Mensanator <[EMAIL PROTECTED]> wrote: > On Mar 3, 4:53 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > > > > > On Mar 3, 4:47 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > On Mar 3, 2:49 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > > > > > On Mar 3, 3:40 pm, Mensanator <[EMAIL PRO

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Mensanator
On Mar 3, 4:53 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Mar 3, 4:47 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > > > > On Mar 3, 2:49 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > > > > On Mar 3, 3:40 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > > Notice anything funny about the "rand

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Robert Kern
Mensanator wrote: > On Mar 3, 4:08 pm, Robert Kern <[EMAIL PROTECTED]> wrote: >> Mensanator wrote: >>> On Mar 3, 2:49 pm, Carl Banks <[EMAIL PROTECTED]> wrote: It's just a bug--probably sympy is messing with the internals of the random number generator. It would be a simple fix. Instead

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Mensanator
On Mar 3, 4:08 pm, Robert Kern <[EMAIL PROTECTED]> wrote: > Mensanator wrote: > > On Mar 3, 2:49 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > >> It's just a bug--probably sympy is messing with the internals of the > >> random number generator.  It would be a simple fix.  Instead of > >> bing abo

Re: sympy: what's wrong with this picture?

2008-03-03 Thread apatheticagnostic
I swear, this is one of the most polite-oriented groups I've ever seen. Not that that's a bad thing or anything, it's nice to be nice. (This has been Captain Universal Truth, over and out) -- http://mail.python.org/mailman/listinfo/python-list

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Carl Banks
On Mar 3, 4:47 pm, Mensanator <[EMAIL PROTECTED]> wrote: > On Mar 3, 2:49 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > > > > > On Mar 3, 3:40 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > Notice anything funny about the "random" choices? > > > > import sympy > > > import time > > > import random

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Robert Kern
Mensanator wrote: > On Mar 3, 2:49 pm, Carl Banks <[EMAIL PROTECTED]> wrote: >> It's just a bug--probably sympy is messing with the internals of the >> random number generator. It would be a simple fix. Instead of >> bing about it, file a bug report. > > I did. > >> Or better yet, submit

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Mensanator
On Mar 3, 2:49 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Mar 3, 3:40 pm, Mensanator <[EMAIL PROTECTED]> wrote: > > > > > > > Notice anything funny about the "random" choices? > > > import sympy > > import time > > import random > > > f = [i for i in sympy.primerange(1000,1)] > > > for i in

Re: sympy: what's wrong with this picture?

2008-03-03 Thread Carl Banks
On Mar 3, 3:40 pm, Mensanator <[EMAIL PROTECTED]> wrote: > Notice anything funny about the "random" choices? > > import sympy > import time > import random > > f = [i for i in sympy.primerange(1000,1)] > > for i in xrange(10): > f1 = random.choice(f) > print f1, > f2 = random.choice(f) >