[sympy] Future plans for pattern matching

2010-05-02 Thread basti
The last few days I spent quite some time on understanding the pattern matching and substitution logic in sympy and trying out ideas to improve them. Now I feel able and willing to redesign most of the stuff and will in the following give an overview about my plans. The ultimate goal is to have a

[sympy] Where to put "developers" documentation

2010-05-01 Thread basti
I wrote some stuff explaining the structural pattern matching algorithm but I'm not sure where the best place for it would be. Since it's pretty long I don't want to put it directly into the python source file. The only fitting place in the docs where I could put it is into the module references. B

[sympy] Re: pattern matching in sympy

2010-04-30 Thread basti
On Apr 30, 3:05 pm, basti wrote: > On Apr 28, 2:59 am, Ronan Lamy wrote: > > Le mardi 27 avril 2010 à 15:49 -0700, basti a écrit : > > > > Like many others before I stumbled over sympy's pattern matching. I'm > > > mainly interested in matchin

[sympy] Re: pattern matching in sympy

2010-04-30 Thread basti
On Apr 28, 2:59 am, Ronan Lamy wrote: > Le mardi 27 avril 2010 à 15:49 -0700, basti a écrit : > > > Like many others before I stumbled over sympy's pattern matching. I'm > > mainly interested in matching non-commutative expressions - which is > > currently

[sympy] Re: Revision of sympy's substitution logic

2010-04-28 Thread basti
On Apr 28, 5:09 pm, "Aaron S. Meurer" wrote: > These are probably good ideas, though I am not to familiar with the code.   > Where does splitting subs into an algebraic subs and a strictly structural > subs fit into all of this? As I said above, it's my intend to replace the matching algorithm i

[sympy] Re: pattern matching in sympy

2010-04-28 Thread basti
On Apr 28, 2:59 am, Ronan Lamy wrote: > >   * Refactor whole matching logic into a separate module, and use the > > Basic.match function only as interface. This was also done for > > printing and I think the pattern matching is complex enough to justify > > this step. > > I don't think it works

[sympy] Revision of sympy's substitution logic

2010-04-28 Thread basti
I'm currently exermining sympy's subs system and I want to share my observations of the currently implemented algorithm and propose some - hopefully favorable - changes. Let's first look what currently happens if subs is called: -- _subs_dict - | | subs -

[sympy] pattern matching in sympy

2010-04-27 Thread basti
Like many others before I stumbled over sympy's pattern matching. I'm mainly interested in matching non-commutative expressions - which is currently simply not implemented. While starting implementing it I detected some shortcomings with sympy which have to be solved first: (1) Inconvenient and su

[sympy] Re: Sympy design question about encapsulation

2008-11-04 Thread basti
I think it's a good proposal of Brian and I sent a patch with an implementation to http://groups.google.com/group/sympy-patches/browse_thread/thread/9f8392a8fec0b3e8 Sebastian Krämer --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

[sympy] Re: Lagrangian: array differentiation

2008-05-21 Thread basti
I just copied your lines and it works for me with the latest hg- version. In [6]: diff(f,theta) Out[6]: [-3*phi + 2*theta, 0, -3*phi] So you'll either have to get the hg repository from http://hg.sympy.org/sympy/ or wait until the next release. Sebastian --~--~-~--~~~---

[sympy] Re: numpy.cos(sympy.pi) throws error

2008-05-06 Thread basti
Okay, the math module can do it, because the __float__ method is implemented. numpy.cos seems to look for a cos method in pi and fails. I'll have to ask the numpy guys why they are not calling __float__ if this fails. --~--~-~--~~~---~--~~ You received this message

[sympy] numpy.cos(sympy.pi) throws error

2008-05-06 Thread basti
Why can I do: >> import math, sympy >> math.cos(sympy.pi) -1.0 but not: >> import numpy, sympy >> numpy.cos(sympy.pi) --- Traceback (most recent call last) /home/sebastian/workspace/hgsympy/ in () /home/sebastian/wo

[sympy] Re: lambdify not match shape of input array if zero function?

2008-05-05 Thread basti
You will have to give the function as a string to lambdify: >>f = lambdify("x*0", "x") >>f(array([1,2,3])) array([0,0]) The problem is that 0*x is automatically simplified to 0: >>x = Symbol("x") >>x*0 0 The solution would be to use a not simplified expression. I'm not sure if that's implement

Re: Google Summer of Code Application

2008-03-31 Thread basti
citly), plotting with Matplotlib and Gnuplot, printing via Latex, export as xml/html, .. I even implemented a csv import functionality, since I needed it for my studies. basti --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: Substitution in polynomials

2007-11-05 Thread basti
value in enumerate(vars): > exec("x%d = Symbol(value)" %(i+1)) > --- why you don't just use: vars = (Symbol('x'+str(i) for i in range(1,101)) you then con access them easiely through vars[i] basti --~--~-~--~~~---~--~~ You recei

Re: symbide state and new sympy release

2007-09-04 Thread basti
I'm currently rebuilding the whole parsing part, writing docstrings and cleaning the code but I may be ready to release in a few ours. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this g

from sympy import * & locals()

2007-09-03 Thread basti
I get an error when doing the following: from sympy import * locals() File "/sympy/core/basic.py", line 1078, in __getattr__ assert issubclass(cls, Singleton),`cls` TypeError: issubclass() arg 1 must be a class Anyone has an idea about this? --~--~-~--~~~---~--~-

Re: save image method implemented

2007-09-01 Thread basti
Brian, I created a Wiki-page plottingFutureFeaturs where I wrote all my suggestions for further development. Maybe you want to look through it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sympy" group. To post

Re: Symbide - a GUI for Sympy

2007-09-01 Thread basti
.com/p/symbide/ Symbide] Every sympy Developer is of course invited to join Symbide! Maybe you can add the link to the sympy starting page. Basti --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sympy" gro

Re: Symbide - a GUI for Sympy

2007-08-31 Thread basti
plotting module! Basti --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For

Re: save image method implemented

2007-08-31 Thread basti
>- It might be nice to set an F-key (maybe F8 or 9) to take a > screenshot and save it as plot_%i.png where i is the lowest positive number > that doesn't exist in the current directory. I followed up your proposal and implemented this interactive screenshot feature. The key is F8. While worki

Re: Symbide - a GUI for Sympy

2007-08-31 Thread basti
A sorry, you'll need not only the latest svn version, additionaly you'll have to replace managed_window.py in the plotting module with the version I'll upload here in sympy.group. Maybe someone can put it to the svn repository. The only change is that the Thread object is stored under self.Thread.

Symbide - a GUI for Sympy

2007-08-31 Thread basti
Hi sympy community! The last to weeks I worked on a GUI for sympy, that I now wan't to present. On this little website I give an overview of the features and the source code is available there too: http://bastikr.ba.funpic.de/ If you have time look at it and write me your thoughts. I don't know

Re: save image method implemented

2007-08-30 Thread basti
I mostly use ubuntu feisty fawn, but I've got windows XP installed too because my scanner doesn't work under linux. I looked through the plotting examples and found that you are using sleep to wait for the rendering. This shouldn't be necessary anymory because in the second patch I let the main-

Re: save image method implemented

2007-08-30 Thread basti
z') p = Plot(visible=False) p[1] = x*y p.saveimage('/home/basti/pic.png', size=(200,300)) __ >I'm currently considering some restructuring which would do a better >job of separating the calculation code, the GL code, and th

save image method implemented

2007-08-30 Thread basti
the 'saveimage' method of a plot object while the plotting window is open. Here is a little example: from sympy import * x, y, z = symbols('xyz') p = Plot() p[1