[sympy] any IDE have intelligence sense for sympy

2014-01-31 Thread Gerhard Martin
any IDE have intelligence sense for sympy -- 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+unsubscr...@googlegroups.com. To post to this group, send email to sympy

[sympy] how to calculate this syz in python with sympy

2014-01-31 Thread Gerhard Martin
ring r = 0,(x,y,z),dp module MD = [1,x2+y,x*y-y*z,0,0],[0,x*z-y,z-x,0,0],[0,0,0,x2+y,x*y-y*z],[1,0,0,x*z-y,z-x]; module MK = syz(MD); matrix MM = MK; print(MM); module N =[x2+y,x*z-y],[x*y-y*z,z-x]; quotient(N,freemodule(nrows(MK))); from sympy import QQ from sympy.abc import x QQ.old_poly

[sympy] Evaluating Sums on arrays of fixed values

2014-01-31 Thread Federico Vaggi
Hi everyone, I was using SymPy to derive an analytic expression for a Jacobian matrix in a least squares system. It worked very well, and I simplified the system down to an equation which is very easy to evaluate, which however involves a vector of residuals: The final SymPy expression is thi

[sympy] any example for this command

2014-01-31 Thread Gerhard Martin
ring r = 0,(x,y,z),dp module MD = [1,x2+y,x*y-y*z,0,0],[0,x*z-y,z-x,0,0],[0,0,0,x2+y,x*y-y*z],[1,0,0,x*z-y,z-x]; module MK = syz(MD); matrix MM = MK; print(MM); module N =[x2+y,x*z-y],[x*y-y*z,z-x]; quotient(N,freemodule(nrows(MK))); from sympy import QQ from sympy.abc import x QQ.old_poly

Re: [sympy] Evaluating Sums on arrays of fixed values

2014-01-31 Thread Jason Moore
Ideally, a code printer that printed a python function for this expression would automatically create the numpy code you show from the expression. But, I'm not sure any of the current printing facilities in sympy can do that. I tried lamdify, ccode, and codegen with no luck. Jason moorepants.info

Re: [sympy] any IDE have intelligence sense for sympy

2014-01-31 Thread Jason Moore
Any IDE that can use the IPython QT or Notebook, will give nice renderings for sympy. Jason moorepants.info +01 530-601-9791 On Fri, Jan 31, 2014 at 3:00 AM, Gerhard Martin wrote: > any IDE have intelligence sense for sympy > > -- > You received this message because you are subscribed to the

Re: [sympy] Evaluating Sums on arrays of fixed values

2014-01-31 Thread Federico Vaggi
Yeah - the problem seems to be that SymPy doesn't know how to convert Sum into a Python function - or at least complains about it. On Friday, 31 January 2014 15:54:32 UTC+1, Jason Moore wrote: > > Ideally, a code printer that printed a python function for this expression > would automatically cr

Re: [sympy] Re: Logic Module

2014-01-31 Thread Sachin Joglekar
Agree with Christian. However, we would need a very good heuristic to calculate how 'far' a formula is from CNF or DNF. Frankly, if the number of variables is small, I don't think any method would be that bad - like for even 6-7 variables, the number of models would be at max 64-128 - a decent

Re: [sympy] any IDE have intelligence sense for sympy

2014-01-31 Thread Aaron Meurer
For tab completion, you can try Jedi (there are plugins for popular editors). It's tough, though, because SymPy makes use of the dynamic features of Python more than most things, so the completion capabilities of Jedi (which is otherwise awesome) are quite limited. I think to get something that wor

Re: [sympy] Re: Logic Module

2014-01-31 Thread Aaron Meurer
I disagree about the symmetry. Consider the case if you have Or(big expression 1, big expression 2). Instead of trying to convert the whole thing into CNF or DNF, you can recursively apply the algorithm. First just try satisfiable(big expression 1). If it's satisfiable, that's your model. If not, t

Re: [sympy] any example for this command

2014-01-31 Thread Aaron Meurer
I'm CCing Tom Bachmann, as he's the one who wrote this code, and is probably the only one who can answer here. Aaron Meurer 2014-01-31 Gerhard Martin : > ring r = 0,(x,y,z),dp > > module MD = > [1,x2+y,x*y-y*z,0,0],[0,x*z-y,z-x,0,0],[0,0,0,x2+y,x*y-y*z],[1,0,0,x*z-y,z-x]; > > module MK = syz(MD);

Re: [sympy] Stats module problem

2014-01-31 Thread Aaron Meurer
It fails like that in master. AttributeError is pretty much always a bug (unless you yourself accessed an attribute that is not there, or passed in the wrong type to something). Aaron Meurer On Wed, Jan 29, 2014 at 12:56 PM, Matthew Rocklin wrote: > This doesn't fail in 0.7.3 (Access to master i

[sympy] sympy.polys.polyerrors.CoercionFailed

2014-01-31 Thread Gerhard Martin
from sympy import QQ, S from sympy.polys.agca.modules import FreeModule, ModuleOrder, FreeModulePolyRing from sympy.polys import CoercionFailed, QQ, lex, grlex, ilex, ZZ from sympy.abc import x, y, z from sympy.utilities.pytest import raises x = Symbol('x') y = Symbol('y') z = Symbol('z') R = QQ.o

Re: [sympy] GSOC 2014 : Solvers/Step by Step Expression Manipulation/Series Expansion

2014-01-31 Thread Aaron Meurer
For the solvers idea, I direct you to the other thread on this list that has much more discussion about it. For the step-by-step idea, I direct you do the thread started by Matthew Rocklin. Also, you should be aware that the by-parts algorithm is already implemented (see manualintegrate.py). You ca

Re: [sympy] Functions: Singularity and Continuity

2014-01-31 Thread Aaron Meurer
Great. Those should be useful for getting solve to return *all* solutions in those cases, even if just in a symbolic form. Do the algorithms work at all if there are symbolic coefficients? Aaron Meurer On Wed, Jan 29, 2014 at 2:23 PM, someone wrote: > Hi, > >> @Harsh, could you brief your work i

Re: [sympy] Re: GSOC 2014:optimization module

2014-01-31 Thread Aaron Meurer
The paper's behind a paywall, so I can't view it. Someone else with access will have to see if it is worth anything. I'm questioning it already though because it's from 1975, when the very concept of "computer algebraic manipulation" was still very new. But that isn't to say that there aren't some

Re: [sympy] Re: Step-by-step Expression Manipulation

2014-01-31 Thread Aaron Meurer
For the UI side, the best thing right now is the integral and differentiation steps on SymPy Gamma. It would be better to spend time making that better than to write some curses interface (I write this as someone who spends probably 70% of his time in front of a text terminal, so don't think that I

Re: [sympy] Re: Solve linear equation matrices

2014-01-31 Thread Aaron Meurer
solve assumes that expressions are equal to zero. So instead of solve(Eq(a, b)) it is usually easier to just type solve(a - b). Aaron Meurer On Thu, Jan 30, 2014 at 11:54 PM, Sachin p wrote: > Why did you subtracted ? > > On Tuesday, January 28, 2014 12:31:52 PM UTC+5:30, Sachin p wrote: >> >> >

Re: [sympy] Evaluating Sums on arrays of fixed values

2014-01-31 Thread Aaron Meurer
It shouldn't be too hard to implement, though, I would imagine. One just needs to implement _print_Sum on the various code printers. lambdify() might be trickier because the code has to fit in a lambda expression. I'm not really sure what the best way to make it work there would be. Aaron Meurer