Re: Issue 2322 in sympy: is_real problems with (pi/log(real))

2013-03-15 Thread sympy
Comment #4 on issue 2322 by skirpic...@gmail.com: is_real problems with (pi/log(real)) http://code.google.com/p/sympy/issues/detail?id=2322 I think, there is some syntax misconception. ask(pi/log(r), Q.real) - meaningless (not good proposition!). Second argument for ask is an assumption

Re: Issue 3693 in sympy: solve() returns only subset of solutions for polynomial eqs

2013-03-15 Thread sympy
Updates: Status: Fixed Comment #4 on issue 3693 by smi...@gmail.com: solve() returns only subset of solutions for polynomial eqs http://code.google.com/p/sympy/issues/detail?id=3693 (No comment was entered for this change.) -- You received this message because this project is

Re: Issue 2322 in sympy: is_real problems with (pi/log(real))

2013-03-15 Thread sympy
Comment #5 on issue 2322 by asmeu...@gmail.com: is_real problems with (pi/log(real)) http://code.google.com/p/sympy/issues/detail?id=2322 Maybe there should be some type checking. -- You received this message because this project is configured to send all issue notifications to this

Re: Issue 1246 in sympy: improve solve() to handle absolute values

2013-03-15 Thread sympy
Comment #3 on issue 1246 by skirpic...@gmail.com: improve solve() to handle absolute values http://code.google.com/p/sympy/issues/detail?id=1246 In [2]: x=Symbol('x') In [3]: solve(abs(x-2),x) Out[3]: [2] In [4]: solve(abs(x-2)-1,x) Out[4]: [1, 3] Looks ok. Close? -- You received this

Re: Issue 2019 in sympy: Add new (assumptions) fact about algebraic elements.

2013-03-15 Thread sympy
Comment #2 on issue 2019 by skirpic...@gmail.com: Add new (assumptions) fact about algebraic elements. http://code.google.com/p/sympy/issues/detail?id=2019 Perhaps, Implies(Q.rational, Q.algebraic) we should include too: https://github.com/sympy/sympy/pull/1899 -- You received this message

Re: Issue 1246 in sympy: improve solve() to handle absolute values

2013-03-15 Thread sympy
Updates: Status: Fixed Comment #4 on issue 1246 by asmeu...@gmail.com: improve solve() to handle absolute values http://code.google.com/p/sympy/issues/detail?id=1246 Yeah, this was fixed a long time ago by commit b6b68bf29d7c6ead6857743452cbea5d2077082b Author: Chris Smith

Re: Issue 2625 in sympy: Imaginary unit in R, ordering of complex numbers

2013-03-15 Thread sympy
Comment #11 on issue 2625 by asmeu...@gmail.com: Imaginary unit in R, ordering of complex numbers http://code.google.com/p/sympy/issues/detail?id=2625 But In [89]: Interval(-oo,oo).contains(I) Out[89]: ⅈ -∞ ∧ ⅈ ∞ and even things like I 2 still work. -- You received this message because

Re: [sympy] Re: solve is terribly slow compared to sage

2013-03-15 Thread Aaron Meurer
On Thu, Mar 14, 2013 at 11:07 PM, Chris Smith smi...@gmail.com wrote: On Fri, Mar 15, 2013 at 6:24 AM, Aaron Meurer asmeu...@gmail.com wrote: On Thu, Mar 14, 2013 at 3:42 AM, Ondřej Čertík ondrej.cer...@gmail.com wrote: On Thu, Mar 14, 2013 at 12:34 AM, Aaron Meurer asmeu...@gmail.com wrote:

[sympy] Re: Vector Calculus module

2013-03-15 Thread Prasoon Shukla
I won't be available till Tuesday (19th March); going on a field trip. In the meanwhile, please keep posting ideas/suggestions/problems if any. Thanks. -- You received this message because you are subscribed to the Google Groups sympy group. To unsubscribe from this group and stop receiving

[sympy] Numerical evaluation of a Sympy function

2013-03-15 Thread Patrice Haldemann
I recently started to learn Python and I have stumbled over an issue since quite a few days. How to evaluate a function at let say x=2. example h=diff(sin(x)) print(h(2.)) =cos(x) or print (N(h(x),2.) =cos(x) or print (h(x).evalf(2.)) =cos (x) but never the value of cos(2.)

Re: [sympy] Numerical evaluation of a Sympy function

2013-03-15 Thread Chris Smith
On Fri, Mar 15, 2013 at 2:27 PM, Patrice Haldemann patrice.haldem...@gmail.com wrote: I recently started to learn Python and I have stumbled over an issue since quite a few days. How to evaluate a function at let say x=2. example h=diff(sin(x)) print(h(2.)) =cos(x) The subs method will

Re: [sympy] Numerical evaluation of a Sympy function

2013-03-15 Thread Chris Smith
Oops, I see I got the decimal point wrong, but you get the idea. Also note that if you use floats you will get a Float (SymPy's version of the float) automatically, but if you use integers or Rationals, you will not: h.subs(x, 2) cos(2) _.n() -0.416146836547142 h.subs(x, S(1)/2) cos(1/2)

[sympy] GSOC 2013, Linear Algebra

2013-03-15 Thread Saurabh Jha
Hi, My name is Saurabh Jha. I am a third year student at an Indian University. My major is Computer Science and Engineering. I am interested in Google Summer of Code 2013 and more specifically want to work on matrix module of sympy. I saw the ideas list and found two points concerned with

[sympy] How to do this simplification of boolean variables?

2013-03-15 Thread Roderick de Nijs
I have boolean variables that can be negated or not, so _x=1-x, in a sum-of-monomials type of expression. Of course, the regular and negated literals are treated as different symbols in sympy. I would like to do the simplification: a*b*c*x + a*b*c*_x + other terms = a*b*c a*b*c*x - a*b*c*_x

Re: [sympy] GSOC 2013, Linear Algebra

2013-03-15 Thread Stefan Krastanov
This is certainly an important project, however it is also rather difficult. Moreover, there was some tangential work on sparse matrices (and maybe symbolic matrix expressions) that must somehow be combined in a coherent module. Most importantly, there is some work done on that by Mateusz

Re: [sympy] How to do this simplification of boolean variables?

2013-03-15 Thread Roderick de Nijs
Hi, smichr Unfortunately not, a constraint I have is that if x and _x appear in other places that do not simplify out, I would like to keep those parts with their original literals. El viernes, 15 de marzo de 2013 14:16:05 UTC+1, smichr escribió: On Fri, Mar 15, 2013 at 6:37 PM, Roderick

Re: [sympy] How to do this simplification of boolean variables?

2013-03-15 Thread Chris Smith
How are you representing the Not variables? Within a Not? Because you could find out who is Not-ed and then replace a given Not with a (1-not_var) and only keep the replacement if it caused terms to disappear. eq a*b*c*x + a*b*c*Not(x) + a*y eq.atoms(Not) set([Not(x)]) _.pop().args[0] x Does

Re: [sympy] How to do this simplification of boolean variables?

2013-03-15 Thread Chris Smith
@mrocklin, I wonder if any of the unify tools -- maybe one to collect identities -- might be used for this. -- You received this message because you are subscribed to the Google Groups sympy group. To unsubscribe from this group and stop receiving emails from it, send an email to

[sympy] Re: Implementation of derivative and integral steps in Gamma

2013-03-15 Thread David Li
Okay, so I'd just like to make sure I'm using strategies/rules correctly. I have the gist of the derivative implementation at https://gist.github.com/lidavidm/5171100. - The rules convert the function to be differentiated into a namedtuple corresponding to the derivative rule to be

Re: [sympy] Numerical evaluation of a Sympy function

2013-03-15 Thread Aaron Meurer
The first argument to evalf tells it how many decimal places to evaluate to. You want subs, either the method or the argument to evalf. Aaron Meurer On Mar 15, 2013, at 4:17 AM, Patrice Haldemann patrice.haldem...@gmail.com wrote: I recently started to learn Python and I have stumbled over an

Re: [sympy] How to do this simplification of boolean variables?

2013-03-15 Thread Aaron Meurer
Maybe use collect() with x and _x and then replace any instance of a multiple of x + _x with 1. Aaron Meurer On Mar 15, 2013, at 7:46 AM, Roderick de Nijs razor4...@gmail.com wrote: Hi, smichr Unfortunately not, a constraint I have is that if x and _x appear in other places that do not

Re: [sympy] Re: Implementation of derivative and integral steps in Gamma

2013-03-15 Thread Aaron Meurer
I don't know if it's idiomatic, but one suggestion is to derive the derivative rules automatically from diff. At the very least use a fallback so it works for functions you don't have rules for. Aaron Meurer On Mar 15, 2013, at 10:42 AM, David Li li.david...@gmail.com wrote: Okay, so I'd just

Re: [sympy] Re: Implementation of derivative and integral steps in Gamma

2013-03-15 Thread Matthew Rocklin
If this an idiomatic use of strategies then I'll convert the rest of the code. There is no idiomatic or agreed upon use of strategies. They're new, experimental, and used almost exclusively by me. The only good idea I can push with confidence is that you should strive to separate your

Re: [sympy] Re: Implementation of derivative and integral steps in Gamma

2013-03-15 Thread David Li
That would be a good idea. Looking at the code, everything has an _eval_derivative method which should work. My only concern is that, for instance, in Pow it combines the power, chain, and exponential rules into one expression. In any case, most of the code I added was related to printing and

[sympy] Re: Numerical evaluation of a Sympy function

2013-03-15 Thread Patrice Haldemann
Thank you very much. You have been most helpful. I wish you a nice weekend. Kind regards Patrice Le vendredi 15 mars 2013 09:42:34 UTC+1, Patrice Haldemann a écrit : I recently started to learn Python and I have stumbled over an issue since quite a few days. How to evaluate a