[sympy] physics.quantum documentation

2011-03-29 Thread krastanov.ste...@gmail.com
Hello all, I was looking at the stable and dev documentation and it seems to me that there is nothing on the physics module. Am I right? Are there any tutorials or references that are not automatically generated? If not, where is the best place to look for a consistent overview of the functionalit

Re: [sympy] physics.quantum documentation

2011-03-29 Thread krastanov.ste...@gmail.com
; Brian > > On Tue, Mar 29, 2011 at 10:31 AM, krastanov.ste...@gmail.com > wrote: > > Hello all, > > > > I was looking at the stable and dev documentation and it seems to me that > > there is nothing on the physics module. Am I right? Are there any > tutorials &g

[sympy] spin 1/2 in physics.quantum and pretty printing

2011-03-30 Thread krastanov.ste...@gmail.com
Hi, I am trying to use the spin classes from physics.quantum. For the moment I am working with a two-state system (spin 1/2). Is there a class dedicated to 1/2 spins (as opposed to J?Ket where I must write zplus=JzKet(1/2,1/2))? My main concern for the moment is the printing. I would like to use

Re: [sympy] Re: spin 1/2 in physics.quantum and pretty printing

2011-03-30 Thread krastanov.ste...@gmail.com
g at the code I will find a working solution, but I prefer to have some style guidelines. Stefan On 30 March 2011 17:00, Vinzent Steinberg wrote: > Hi, > > On Mar 30, 4:49 pm, "krastanov.ste...@gmail.com" > wrote: > > My main concern for the moment is the printing. I

Re: [sympy] Re: spin 1/2 in physics.quantum and pretty printing

2011-03-30 Thread krastanov.ste...@gmail.com
, Vinzent Steinberg wrote: > On Mar 30, 5:14 pm, "krastanov.ste...@gmail.com" > wrote: > > For example: > > |z+> for JzKet(1/2,+1/2) and |z-> for JzKet(1/2,-1/2) seem reasonable to > me. > > The same for x and y. > > > > But there is also a more g

Re: [sympy] spin 1/2 in physics.quantum and pretty printing

2011-03-30 Thread krastanov.ste...@gmail.com
Thank you for the answer. I filed an issue and I will try to make an useful patch some time in the near future. Stefan On 30 March 2011 22:55, Brian Granger wrote: > Hi, > > > I am trying to use the spin classes from physics.quantum. For the moment > I > > am working with a two-state system (sp

[sympy] physics.quantum - labels vs args - printing vs content

2011-03-31 Thread krastanov.ste...@gmail.com
Hi, In short: *label is used by the printing functions but also it is used instead of args in some other functions* I'm trying to make the printing in physics.quantum.spin less ambiguous. According to the answer I received here http://groups.google.com/group/sympy/msg/3f8d4fe139b1884a it will be

Re: [sympy] physics.quantum - labels vs args - printing vs content

2011-03-31 Thread krastanov.ste...@gmail.com
Hi, I checked out TimeDepState and I believe that I got it now and I will use it for the spins over the weekend. Stefan On 31 March 2011 18:15, Brian Granger wrote: > Hi, > > > In short: label is used by the printing functions but also it is used > > instead of args in some other functions > >

Re: [sympy] physics.quantum - labels vs args - printing vs content

2011-03-31 Thread krastanov.ste...@gmail.com
I mean the style of the code, not the class, obviously :) On 31 March 2011 21:47, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wrote: > Hi, > > I checked out TimeDepState and I believe that I got it now and I will use > it for the spins over the weekend. > >

[sympy] patch for the printing of quantum.spin

2011-04-01 Thread krastanov.ste...@gmail.com
Following from here http://groups.google.com/group/sympy/msg/accc99bb1030e6b2 Concerning issue http://code.google.com/p/sympy/issues/detail?id=2251 As the printing of spin states in physics.quantum is a bit ambiguous I have tried to change it. I have override the _print_content* methods to add a p

[sympy] Re: patch for the printing of quantum.spin

2011-04-01 Thread krastanov.ste...@gmail.com
7;) ==> ❘ψ;t⟩ *This is probably ok:* TimeDepKet('psi', 't').dual * TimeDepKet('psi', 't') ==> ⟨ψ❘ψ;t⟩ # Only one t *This is NOT ok:* JxKet('1/2','1/2').dual*JzKet('1/2','1/2') ==> ⟨1/2,-1/2❘z:1/2,-1/2⟩ # Th

Re: [sympy] Re: patch for the printing of quantum.spin

2011-04-01 Thread krastanov.ste...@gmail.com
That is not the problem _but_ It is true that I should define _direction_string_label for J?Bra for another reason. With the patch (and no _direction_string_label for the J?Bras) I have JxKet('1/2','1/2').dual ==> ⟨z:1/2,-1/2❘ which is ok. The problem is that innerproduct uses print_label and no

Re: [sympy] Re: patch for the printing of quantum.spin

2011-04-01 Thread krastanov.ste...@gmail.com
wrote: > > On Apr 1, 12:21 pm, "krastanov.ste...@gmail.com" > > wrote: > >> The problem is that innerproduct uses print_label and not print_content > for > >> the bra which is the way it should be, at least for TimeDepKet. > >> > > > >

Re: [sympy] Re: patch for the printing of quantum.spin

2011-04-02 Thread krastanov.ste...@gmail.com
Thanks. Brian also explained it in a private message. On 2 April 2011 14:25, Vinzent Steinberg wrote: > On 1 Apr., 18:31, "krastanov.ste...@gmail.com" > wrote: > > If there is a consensus on this I will be happy to change it. > > > > Otherwise is the patch ok?

Re: [sympy] Re: patch for the printing of quantum.spin

2011-04-02 Thread krastanov.ste...@gmail.com
...@gmail.com < krastanov.ste...@gmail.com> wrote: > Thanks. Brian also explained it in a private message. > > > > On 2 April 2011 14:25, Vinzent Steinberg > wrote: > >> On 1 Apr., 18:31, "krastanov.ste...@gmail.com" >> wrote: >> > If

Re: [sympy] Re: patch for the printing of quantum.spin

2011-04-02 Thread krastanov.ste...@gmail.com
My proposition may be detrimental for _sympyrepr in qexpr.py. Is it? Should _print_contents print the brackets or not? On 2 April 2011 20:53, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wrote: > Hi > > I have a question about the behavior of _print_contents. As it st

Re: [sympy] Re: patch for the printing of quantum.spin

2011-04-02 Thread krastanov.ste...@gmail.com
Ok, there is a pull request. On 2 April 2011 21:15, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wrote: > My proposition may be detrimental for _sympyrepr in qexpr.py. Is it? > Should _print_contents print the brackets or not? > > > On 2 April 2011 20:53, krast

[sympy] quantum - spin 1/2

2011-04-05 Thread krastanov.ste...@gmail.com
Hi all, I would like to know what is the agreed upon way to treat spin 1/2 systems in physics.quantum? I would like to write a shorthand class for those states (a subclass of J?Ket maybe), but: - If it is just a subclass what stops me from writing my_spin_state.j = "something different than 1/2

[sympy] writing tests for pretty_print

2011-04-20 Thread krastanov.ste...@gmail.com
Hi, I have a branch that is ready for review (and hopefully inclusion) but I have left a few assert tests commented with a TODO tag. Those tests deal with pretty printing and it would be nice to finish them, but reconstructing unicode strings with escape characters is not very amusing. Is there a

Re: [sympy] writing tests for pretty_print

2011-04-20 Thread krastanov.ste...@gmail.com
/unicode.html but nothing very useful. The branch is https://github.com/sympy/sympy/pull/186 Regards Stefan On 20 April 2011 17:25, Alexey U. Gudchenko wrote: > 20.04.2011 15:08, krastanov.ste...@gmail.com пишет: > > Hi, > > > > I have a branch that is ready for review

Re: [sympy] writing tests for pretty_print

2011-04-20 Thread krastanov.ste...@gmail.com
...@gmail.com < krastanov.ste...@gmail.com> wrote: > The problem is that I am not able to create the u""" """ string in an > automatic manner (and if I just copy-paste from the isympy terminal I get > SyntaxError: Non-ASCII character) > > for example prett

Re: [sympy] writing tests for pretty_print

2011-04-20 Thread krastanov.ste...@gmail.com
copy&paste the ⨂ symbol directly into the code. > > Or you could use:: > > >>> print repr("⨂") > '\xe2\xa8\x82' > >>> print '\xe2\xa8\x82' > ⨂ > > Felix > > > > On 04/20/2011 06:14 PM, krastanov.st

[sympy] printing in quantum

2011-05-26 Thread krastanov.ste...@gmail.com
Hi, First of all, I am sorry that I left the pull request I'll be talking about halfway finished after taking so much of your time with questions about the code. I had some more urgent responsibilities lately. I'm talking about the pull request dealing with changes in the way that quantum prints

Re: [sympy] Re: printing in quantum

2011-05-27 Thread krastanov.ste...@gmail.com
is is just an issue with the order I see in github. It's not that important for the pull request. I just find it strange. What about the code? I'm looking at the print_repr tests. Is the rest OK? Stefan On 27 May 2011 17:44, Vinzent Steinberg wrote: > On 26 Mai, 21:18, "kra

[sympy] repr and srepr

2011-05-27 Thread krastanov.ste...@gmail.com
I know (or I think I know) that eval(srepr(thing)) == thing in sympy. Should this be also true for repr (the python build-in)? Why are there two different functions that should be doing the same thing? Is repr hard do modify? Regards Stefan -- You received this message because you are subscribe

Re: [sympy] Re: printing in quantum

2011-05-27 Thread krastanov.ste...@gmail.com
were added for the printing -some bugs in the latex strings were found and fixed -some typos in comments were fixed Am I missing something? Stefan On 27 May 2011 18:45, krastanov.ste...@gmail.com wrote: > It's not the same order. git log and > https://github.com/sympy/sympy/pull/18

[sympy] an old pull request

2011-06-02 Thread krastanov.ste...@gmail.com
Hi, I'm writing about an old pull request regarding some bugs/enhancements in the printing of the quantum module: https://github.com/sympy/sympy/pull/186 A week ago I explained it in more details here: https://groups.google.com/d/topic/sympy/ZacngABe3Ws/d

Re: [sympy] Re: Some changes to representations in sympy.physics.quantum

2011-06-04 Thread krastanov.ste...@gmail.com
Hi, It's quite probable that I just don't understand the logic behind represent.py but I have a question here. Shouldn't the representation of |ket> in the continuous basis X be a function of some variable (as opposed to an expression)? Something like dummy_x --> That makes it unnecessary to de

Re: [sympy] Re: Some changes to representations in sympy.physics.quantum

2011-06-04 Thread krastanov.ste...@gmail.com
x27;m missing the point. Stefan On 4 June 2011 15:50, Tomo Lazovich wrote: > Hi Stefan, > > Thanks for your comments! Some responses below: > > On Sat, Jun 4, 2011 at 5:42 AM, krastanov.ste...@gmail.com < > krastanov.ste...@gmail.com> wrote: > >> Hi, >>

Re: [sympy] Re: Some changes to representations in sympy.physics.quantum

2011-06-04 Thread krastanov.ste...@gmail.com
oduct.py is implemented, not > represent. The evaluated inner product is an expression rather than a > function. Perhaps the author of innerproduct can comment on that. > > > On Sat, Jun 4, 2011 at 11:38 AM, krastanov.ste...@gmail.com < > krastanov.ste...@gmail.com> wrote: >

Re: [sympy] Re: Question about representing full expressions in sympy.physics.quantum

2011-06-07 Thread krastanov.ste...@gmail.com
That remark is quite important. In the same spirit I would like to know if there are any arguments for using an expression for the representation instead of a function (the use of x_1 or x_dummy or whatever seems awkward (personal opinion!)). Maybe one such argument is that using a function instea

Re: [sympy] Re: Adding sympy.physics to documentation

2011-06-07 Thread krastanov.ste...@gmail.com
What would the classical module contain? Won't "newtonian", "galilean" or just "mechanics" be more suitable in this case? For example Hamiltonian mechanics applies to boot classical and quantum physics. Also optics/thermodynamics/stat. phys./etc don't play well with such separation. Anyway, this

[sympy] Why is Symbol subclassed from Boolean?

2011-06-08 Thread krastanov.ste...@gmail.com
Why is it necessary? -- 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 sympy+unsubscr...@googlegroups.com. For more options, visit this group at

Re: [sympy] Why is Symbol subclassed from Boolean?

2011-06-08 Thread krastanov.ste...@gmail.com
On 8 June 2011 22:47, Haz wrote: > Think of it as a predicate -- it can be either true or false (hence > boolean). > Why it needs to be true or false? I don't expect the x in sin(x) to be boolean. What am I missing? > On Jun 8, 2011 4:41 PM, "krastanov.ste...@gmail.

Re: [sympy] Re: Why is Symbol subclassed from Boolean?

2011-06-09 Thread krastanov.ste...@gmail.com
On 9 June 2011 16:17, Vinzent Steinberg wrote: > On 9 Jun., 00:04, Haz wrote: > > > Why it needs to be true or false? I don't expect the x in sin(x) to be > > > boolean. What am I missing? > > > > Nothing -- I misunderstood. Ronan may be able to shed some light: > > -https://github.com/sympy/sy

[sympy] working with the real/imaginary part of a symbolic expression

2011-06-09 Thread krastanov.ste...@gmail.com
Hi, Short version of the question: How to take the real/imaginary part of a symbolic expression? Can real(x + I*y) give me "x" with the proper assumptions in place? Here is the context: I'm implementing a small gaussian optics module that I am going to need during an internship. Here is my probl

Re: [sympy] Question about functions in sympy

2011-06-09 Thread krastanov.ste...@gmail.com
On 10 June 2011 01:13, Mateusz Paprocki wrote: > Hi, > > On 9 June 2011 16:05, Tomo Lazovich wrote: > >> Hi everyone, >> >> I'm thinking of implementing a Wavefunction class in >> sympy.physics.quantum, and as a start I'm wondering about functions in sympy >> in general. Disclaimer is that this

Re: [sympy] working with the real/imaginary part of a symbolic expression

2011-06-09 Thread krastanov.ste...@gmail.com
m(x + I*y) > Out[4]: y > > Aaron Meurer > > On Thu, Jun 9, 2011 at 4:31 PM, krastanov.ste...@gmail.com > wrote: > > Hi, > > > > Short version of the question: How to take the real/imaginary part of a > > symbolic expression? Can real(x + I*y) give me "

Re: [sympy] working with the real/imaginary part of a symbolic expression

2011-06-09 Thread krastanov.ste...@gmail.com
I have found it. For future reference it's complicated_expression.expand(complex=True). On 10 June 2011 01:54, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wrote: > What about re(1/(x+I*y))? It does not evaluate. Is there a function that I > should call befo

Re: [sympy] working with the real/imaginary part of a symbolic expression

2011-06-09 Thread krastanov.ste...@gmail.com
etail?id=754#c15. > > Aaron Meurer > > On Thu, Jun 9, 2011 at 5:54 PM, krastanov.ste...@gmail.com > wrote: > > What about re(1/(x+I*y))? It does not evaluate. Is there a function that > I > > should call before re() so I have something with real denominator? > >

[sympy] __slots__ don't work if subclassing from Add

2011-06-10 Thread krastanov.ste...@gmail.com
Hi, I am trying to create a class that is basically the sum of two arguments given in the constructor. Here is what I have done (simplified example with omitted arguments and slots): class BeamParameter(Add): __slots__ = ['x', 'y'] def __new__(cls, x, y): obj = Add.__new__(cls,

[sympy] bug in pyglet, please update

2011-06-10 Thread krastanov.ste...@gmail.com
I have no ploting at all. There is a bug in pyglet (under Ubuntu): http://code.google.com/p/sympy/issues/detail?id=2474 Would just unpacking the latest tar over the current files be sufficient? Should I do it and send a pull request or a more involved process is required? Also it will be best if

Re: [sympy] __slots__ don't work if subclassing from Add

2011-06-10 Thread krastanov.ste...@gmail.com
e about how you expect this class to work. What do > you expect BeamParamter(0, 1) to return? How about > BeamParameter(BeamParameter(x, y), z) (nested classes)? > > Aaron Meurer > > On Fri, Jun 10, 2011 at 12:10 PM, krastanov.ste...@gmail.com > wrote: > > Hi, > >

Re: [sympy] __slots__ don't work if subclassing from Add

2011-06-10 Thread krastanov.ste...@gmail.com
return self.z+I*self.z_r Now I can do: >>>bp = BeamParameter(1,2) >>>bp.q 1+I*2 But I would like to have: >>>bp 1+I*2 On 10 June 2011 23:06, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wrote: > BeamParameter should be just a complex number.

Re: [sympy] bug in pyglet, please update

2011-06-11 Thread krastanov.ste...@gmail.com
mport error catching. On 11 June 2011 03:39, Aaron Meurer wrote: > On Fri, Jun 10, 2011 at 2:58 PM, krastanov.ste...@gmail.com > wrote: > > I have no ploting at all. > > You're not the only one :) > > > > > There is a bug in pyglet (under Ubuntu)

Re: [sympy] bug in pyglet, please update

2011-06-11 Thread krastanov.ste...@gmail.com
The pull request is in. It works for me and it is fairly trivial, but there is always the possibility of side effects. https://github.com/sympy/sympy/pull/406 Stefan On 11 June 2011 11:50, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wrote: > I started moving pyglet to an

Re: [sympy] SymPy 0.7.0 Release Candidate 1

2011-06-12 Thread krastanov.ste...@gmail.com
On 12 June 2011 16:07, Tomo Lazovich wrote: > I tested the Windows installer in Windows 7. You have to be sure to run the > installer as an administrator or it complains that it can't set some > registry keys. Besides that, it seems to have installed without any > problems. Is it possible to run

Re: [sympy] Problem with evaluating rotation operator

2011-06-16 Thread krastanov.ste...@gmail.com
Hi, Did you noticed that in master qapply(Jx*JxKet(...)) does not evaluate to ...*hbar*JxKet. Jz*JzKet evaluates as expected but not the other two base kets. Maybe it has nothing to do with your problem, but as you are rewriting operators and states it may intervene. Also concerning the printing

[sympy] Should unicode characters be used in the code?

2011-06-20 Thread krastanov.ste...@gmail.com
Certain tests pass if unicode characters are escaped (like in u"\") but do not pass if the character is written in unicode (like u"Ф"). For examples see the tests that fail in the branch quantum_printing. Those test pass if they are run in python, fail in ipython (there is a bug in ipython htt

Re: [sympy] Should unicode characters be used in the code?

2011-06-20 Thread krastanov.ste...@gmail.com
2011/6/20 Mateusz Paprocki > Hi, > > 2011/6/20 krastanov.ste...@gmail.com > > Certain tests pass if unicode characters are escaped (like in u"\") but >> do not pass if the character is written in unicode (like u"Ф"). For examples >> see the

Re: [sympy] Should unicode characters be used in the code?

2011-06-20 Thread krastanov.ste...@gmail.com
in test_pretty.py (including the unicode > coding comment at the top of the file). > > By the way, I don't know to what degree the current code actually > follows what I said above. But if physics code is in other modules, > it should probably be moved into the physics module.

Re: [sympy] Should unicode characters be used in the code?

2011-06-21 Thread krastanov.ste...@gmail.com
p the pull request and start working on the implementation of PhysicsPrettyPrinter? Stefan On 21 June 2011 10:00, Aaron Meurer wrote: > 2011/6/21 Mateusz Paprocki : > > Hi, > > > > 2011/6/20 krastanov.ste...@gmail.com > >> > >> > >> 2011/6/

[sympy] issues to be closed

2011-06-26 Thread krastanov.ste...@gmail.com
Hi Issues 2144 http://code.google.com/p/sympy/issues/detail?id=2144 2474 http://code.google.com/p/sympy/issues/detail?id=2474 and maybe (just maybe!) 1867 http://code.google.com/p/sympy/issues/detail?id=1867 were just dealt with. A comment with the commit hash is in 2144. Can someone with admin r

Re: [sympy] gaussian optics module

2011-09-22 Thread krastanov.ste...@gmail.com
In most (but not all) cases the arguments are directly passed to the constructor of matrices. I suppose that then sympification is not necessary. Am I right? After all I have type(Matrix( (1,) )[0]) == numbers.One. I will sympify all arguments that are not implicitly sympified and also will change

Re: [sympy] gaussian optics module

2011-09-24 Thread krastanov.ste...@gmail.com
> > *" it will import all the right things, and none of the internal > > variables or classes. > > I agree with the __all__ statement. > > Ondrej > > > > > Aaron Meurer > > > > On Thu, Sep 22, 2011 at 7:34 PM, Chris Smith wrote: > &g

[sympy] Yet another plotting framework for sympy

2011-10-21 Thread krastanov.ste...@gmail.com
This time with multiple backends. Please see the prototype in https://github.com/sympy/sympy/pull/673 What do you think about the interface proposed in test.py? -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to symp

[sympy] Re: Yet another plotting framework for sympy

2011-10-21 Thread krastanov.ste...@gmail.com
I'll contact you after the weekend. I hope you find the code useful. There is certainly much more work to be done on it, but it's already useful. Warning: Expect many bugs! Regards Stefan On 21 October 2011 18:12, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wro

Re: [sympy] Google Code-In

2011-10-23 Thread krastanov.ste...@gmail.com
I would also like to help. Hopefully I'll find the time. About the translations - I speak Bulgarian and I can probably find few people willing to help with French translations. Stefan Krastanov On 23 October 2011 21:33, Aaron Meurer wrote: > Another thing: we need to have at least five transla

[sympy] Plotting framework

2011-10-26 Thread krastanov.ste...@gmail.com
Hi, Some time ago I announced that I was playing with some code for a new, more general plotting framework for sympy. The pull request for the proposal is https://github.com/sympy/sympy/pull/673and I've cleaned it up a bit. In the pull request I describe the idea. It should support multiple backe

Re: [sympy] Plotting framework

2011-10-26 Thread krastanov.ste...@gmail.com
differences with the current plotting system ? Are there > some "visual" examples ? > > Best regards. > C. > > 2011/10/26 krastanov.ste...@gmail.com > >> Hi, >> >> Some time ago I announced that I was playing with some code for a new, >> mo

Re: [sympy] Plotting framework

2011-10-27 Thread krastanov.ste...@gmail.com
2011/10/27 Ondřej Čertík > Hi Stefan, > > On Wed, Oct 26, 2011 at 12:54 PM, krastanov.ste...@gmail.com > wrote: > > The visual examples are in test.py in the root (the file will be > > deleted/moved if there is ever a version for merging)- it's meant for > copy

Re: [sympy] Google Code-In

2011-10-30 Thread krastanov.ste...@gmail.com
Shouldn't there be a link to the sorted issues for GCI on the application page? On 30 October 2011 03:51, Aaron Meurer wrote: > 2011/10/29 Ondřej Čertík : > > On Wed, Oct 26, 2011 at 1:01 AM, Aaron Meurer > wrote: > > [...] > >> > >> Second, once we have at least five of each category, we need

Re: [sympy] Re: Google Code-In

2011-10-31 Thread krastanov.ste...@gmail.com
I've added an issue about code formating http://code.google.com/p/sympy/issues/detail?id=2815&thanks=2815&ts=1320077133 but I can not edit the tags so it's not marked as GCI issue. On 31 October 2011 08:56, lira.lg wrote: > I want to help. The last year I was a GCI mentor for Haiku and Parrot >

[sympy] evalf with subs is oo times slower than without

2011-11-09 Thread krastanov.ste...@gmail.com
In [21]: s = summation(k**(-2.1), (k, 1, oo)) In [23]: %timeit s.evalf() 1 loops, best of 3: 196 ms per loop In [24]: s = summation(k**(-x), (k, 1, oo)) In [26]: %timeit s.evalf(subs={x : 2.1}) still calculating This seems like a bug? -- You received this message because you are subscribed to t

[sympy] problems with lambdify

2011-11-09 Thread krastanov.ste...@gmail.com
> > *concerning sums: > *In [1]: s = summation(k**(-x),(k,1,oo)) > > In [2]: s > Out[2]: > > ∞ > ___ > \ ` > \-x > / k > /__, > k = 1 > > In [3]: fs = lambdify([x], s) # I've added a print statement inside so I > can see the lambda string > lambda x: (Sum(k**(-x), (k, 1, oo))) > > I

[sympy] Re: evalf with subs is oo times slower than without

2011-11-09 Thread krastanov.ste...@gmail.com
urn RuntimeError: maximum recursion depth exceeded On 9 November 2011 16:46, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wrote: > In [21]: s = summation(k**(-2.1), (k, 1, oo)) > In [23]: %timeit s.evalf() > 1 loops, best of 3: 196 ms per loop > > In [24]: s = summation(k

[sympy] Re: evalf with subs is oo times slower than without

2011-11-09 Thread krastanov.ste...@gmail.com
Actually the problem is in summation, not in evalf. In [3]: %timeit(gamma(1000)) 10 loops, best of 3: 11.3 us per loop In [4]: %timeit(gamma(x).subs({x:1000})) 1 loops, best of 3: 57.1 us per loop On 9 November 2011 16:51, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com>

Re: [sympy] evalf with subs is oo times slower than without

2011-11-09 Thread krastanov.ste...@gmail.com
2011/11/9 Ondřej Čertík > On Wed, Nov 9, 2011 at 7:46 AM, krastanov.ste...@gmail.com > wrote: > > In [21]: s = summation(k**(-2.1), (k, 1, oo)) > > In [23]: %timeit s.evalf() > > 1 loops, best of 3: 196 ms per loop > > > > In [24]: s = summation(k**(-x), (k,

[sympy] Should lambdify be permitted to return symbols?

2011-11-09 Thread krastanov.ste...@gmail.com
In [22]: lambdify([y], x + y)(1) Out[22]: x + 1 I believe that this should raise an error. But maybe there are some usecases that I'm missing. -- 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.

Re: [sympy] evalf with subs is oo times slower than without

2011-11-09 Thread krastanov.ste...@gmail.com
I've created an issue for this one http://code.google.com/p/sympy/issues/detail?id=2837&thanks=2837&ts=1320876163 On 9 November 2011 20:23, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wrote: > 2011/11/9 Ondřej Čertík > >> On Wed, Nov 9, 2011 at 7:46

Re: [sympy] problems with lambdify

2011-11-10 Thread krastanov.ste...@gmail.com
On 10 November 2011 00:21, Raoul wrote: > Hi, > > > > *concerning sums: > > > *In [1]: s = summation(k**(-x),(k,1,oo)) > > > > > > In [2]: s > > > Out[2]: > > > > > > ∞ > > > ___ > > > \ ` > > > \-x > > > / k > > > /__, > > > k = 1 > > > > > > In [3]: fs = lambdify([x], s) # I've

[sympy] completely unused class DeferredVector?

2011-11-10 Thread krastanov.ste...@gmail.com
Hi, While trying to wrap my head around lambdify I have found this commit: commit bbddfc4e479f3387a5d839c237459c6f9578d4d3 Author: Andrew Straw Date: Sat Jan 17 14:38:34 2009 -0800 DeferredVector implementation, allowing lambdification using arbitrary vectors sympy/matrices/__init__.py

[sympy] Re: completely unused class DeferredVector?

2011-11-10 Thread krastanov.ste...@gmail.com
I'm wrong, it's used and the tests show why one would want this, but the lack of docstring makes it hard to understand. Shouldn't this be mentioned at least in lambdify with some examples? On 10 November 2011 16:01, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wr

[sympy] Is lambdify for numeric calculations or not? Either it needs refactoring or I don't understand it at all...

2011-11-10 Thread krastanov.ste...@gmail.com
Hi, I hope Aaron could comment as this concerns the plotting problem he was working on (pull request 696). So for the last day or so I was trying to understand lambdify. According to the docstring it's used for numeric calculations - that's the whole idea behind translating sympy functions to mpm

Re: [sympy] Re: Google Code-In

2011-11-10 Thread krastanov.ste...@gmail.com
I've just added some text to the page. The quality of the language is not great at the moment, but if you like the structure I'll fix the language. -- You received this message because you are subscribed to the Google Groups "sympy" group. To post to this group, send email to sympy@googlegroups.

Re: [sympy] Is lambdify for numeric calculations or not? Either it needs refactoring or I don't understand it at all...

2011-11-11 Thread krastanov.ste...@gmail.com
On 11 November 2011 02:26, Aaron Meurer wrote: > On Thu, Nov 10, 2011 at 8:58 AM, krastanov.ste...@gmail.com > wrote: > > Hi, > > > > I hope Aaron could comment as this concerns the plotting problem he was > > working on (pull request 696). > > > >

Re: [sympy] Example plots from the new code

2011-11-11 Thread krastanov.ste...@gmail.com
t; > > And if you just want to test the plotting of your own functions in > > isympy, you have to run "from sympy.plotting.newplot import *", or > > else it will use the old plotting. The syntax is > > > > In [8]: p = Plot(Heaviside(x)*(1 - x)*sin(y), (x,

Re: [sympy] Example plots from the new code

2011-11-11 Thread krastanov.ste...@gmail.com
Some more examples are present in test.py (the second file in the pull request) that can be used in the same way as examples.py. On 11 November 2011 22:13, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wrote: > Hi > > I'm a bit ashamed that Aaron gave better intr

Re: [sympy] Example plots from the new code

2011-11-11 Thread krastanov.ste...@gmail.com
On 11 November 2011 23:31, Aaron Meurer wrote: > On Fri, Nov 11, 2011 at 2:13 PM, krastanov.ste...@gmail.com > wrote: > > Hi > > > > I'm a bit ashamed that Aaron gave better introduction than me for my own > > code :) > > Anyway, I think the docu

[sympy] lambdify again

2011-11-12 Thread krastanov.ste...@gmail.com
Hi, I was bashing lambdify lately, but it seems this function is smarter than me. I'll skip the details about what I incorrectly thought the problem was and present the real problem. This works great: lambdify(x, Integral(y, (y, 0, x))) _(2) ---> Integral(y, (y, 0, 2)) float(_) ---> the righ

[sympy] abstract syntax tree

2011-11-12 Thread krastanov.ste...@gmail.com
Is there any way to get the expression tree from an expression (either using the python abstract syntax tree module or just some tuples): for example get_tree( x+y*sin(z) ) would return (Add, x, (Mul, y, (Sin z))) or (BinOp, Add, ((Symbol, x), (BinOp, Mul, (blah blah blah -- You received

[sympy] Re: abstract syntax tree

2011-11-12 Thread krastanov.ste...@gmail.com
This: import ast ast.parse(repr(expression)) will do the trick if repr is well coded. How much faith should I put in the repr strings in sympy? Or there is another way? On 12 November 2011 18:20, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wrote: > Is there any way t

Re: [sympy] Example plots from the new code

2011-11-12 Thread krastanov.ste...@gmail.com
On 12 November 2011 20:43, Aaron Meurer wrote: > On Fri, Nov 11, 2011 at 4:25 PM, krastanov.ste...@gmail.com > wrote: > > > > > > On 11 November 2011 23:31, Aaron Meurer wrote: > >> > >> On Fri, Nov 11, 2011 at 2:13 PM, krastanov.ste...@gmail.com >

Re: [sympy] Example plots from the new code

2011-11-12 Thread krastanov.ste...@gmail.com
"CGI student" should read "GCI student" for GoogleCodeIn On 12 November 2011 22:04, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wrote: > > > On 12 November 2011 20:43, Aaron Meurer wrote: > >> On Fri, Nov 11, 2011 at 4:25 PM, krastanov.s

Re: [sympy] Example plots from the new code

2011-11-12 Thread krastanov.ste...@gmail.com
On 12 November 2011 22:46, Aaron Meurer wrote: > On Sat, Nov 12, 2011 at 2:04 PM, krastanov.ste...@gmail.com > wrote: > > > > > > On 12 November 2011 20:43, Aaron Meurer wrote: > >> > >> On Fri, Nov 11, 2011 at 4:25 PM, krastanov.ste...@gmail.c

Re: [sympy] Re: abstract syntax tree

2011-11-12 Thread krastanov.ste...@gmail.com
Sat, Nov 12, 2011 at 11:01 AM, Alexey U. Gudchenko > wrote: > > 12.11.2011 21:42, krastanov.ste...@gmail.com пишет: > >> This: > >> > >> import ast > >> ast.parse(repr(expression)) > > If you want a repr() representation, you should instead use s

Re: [sympy] Re: abstract syntax tree

2011-11-12 Thread krastanov.ste...@gmail.com
2011 02:09, Mateusz Paprocki wrote: > Hi, > > On 12 November 2011 17:00, krastanov.ste...@gmail.com < > krastanov.ste...@gmail.com> wrote: > >> Ok, but why are those printed differently (ipython --profile=sympy): >> >> In [34]: sin(x).func >> Out[34]

Re: [sympy] Re: abstract syntax tree

2011-11-12 Thread krastanov.ste...@gmail.com
, Mateusz Paprocki wrote: > Hi, > > On 12 November 2011 17:16, krastanov.ste...@gmail.com < > krastanov.ste...@gmail.com> wrote: > >> Then I suppose I can just call a function that returns a string. Here is >> the problem I have: >> >> In [42]: la

Re: [sympy] Re: abstract syntax tree

2011-11-12 Thread krastanov.ste...@gmail.com
Thank you for the information. On 13 November 2011 02:34, Mateusz Paprocki wrote: > Hi, > > On 12 November 2011 17:25, krastanov.ste...@gmail.com < > krastanov.ste...@gmail.com> wrote: > >> Can the default printer be changed so lambdarepr(SomeClass(args)) and >>

[sympy] new experimental lambdify - now we can plot sums

2011-11-13 Thread krastanov.ste...@gmail.com
Hi, You may know that lambdify was not working with Sums, quantum stuff, and actually almost any nontrivial expression. I have rewritten it for use in the plotting module using a very different approach. It's experimental and I very much doubt that it will replace the current lambdify (it has to

Re: [sympy] lambdify again

2011-11-13 Thread krastanov.ste...@gmail.com
On 13 November 2011 21:10, Aaron Meurer wrote: > On Sat, Nov 12, 2011 at 9:44 AM, krastanov.ste...@gmail.com > wrote: > > Hi, > > > > I was bashing lambdify lately, but it seems this function is smarter than > > me. I'll skip the details about what I in

Re: [sympy] Example plots from the new code

2011-11-13 Thread krastanov.ste...@gmail.com
On 13 November 2011 21:19, Aaron Meurer wrote: > > Next release: > > from sympy.plotting import plot # the function you proposed > > from sympy.plotting import Plot # the old Plot with added deprecation > > warning > > from sympy.plotting.newplot import Plot # the new Plot > > No complicated prox

[sympy] Re: new experimental lambdify - now we can plot sums

2011-11-13 Thread krastanov.ste...@gmail.com
On 13 November 2011 19:34, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wrote: > Hi, > > You may know that lambdify was not working with Sums, quantum stuff, and > actually almost any nontrivial expression. > > I have rewritten it for use in the plotting modul

Re: [sympy] Example plots from the new code

2011-11-14 Thread krastanov.ste...@gmail.com
On 14 November 2011 17:36, Aaron Meurer wrote: > On Sun, Nov 13, 2011 at 1:35 PM, krastanov.ste...@gmail.com > wrote: > > > > On 13 November 2011 21:19, Aaron Meurer wrote: > >> > >> > Next release: > >> > from sympy.plotting import plot # t

Re: [sympy] Re: Latex -> Sympy

2011-11-15 Thread krastanov.ste...@gmail.com
On 15 November 2011 18:25, Aaron Meurer wrote: > Does anyone know of a good framework to implement this in, so that it > is easily extensible (something like the printer, only backwards)? > Obviously, we can implement the simple cases like \frac{}{} and ^ > Actually even the \frac{}{} stuff can n

Re: [sympy] Re: Releasing SymPy 0.7.2

2011-11-15 Thread krastanov.ste...@gmail.com
In pull request 673 there is a new plotting module. It's functional and Aaron and Ondrej were interested in merging it before the next release. It seems that the release will be sooner than expected. Does this change the plans about the pull request 673? As I've said the code is mostly ready, but

Re: [sympy] Google Code-In

2011-11-17 Thread krastanov.ste...@gmail.com
Hi, I would be able to spent an hour or two on that Saturday afternoon (European time, from 14UTC to 18UTC) and maybe Friday evening (22UTC) but: 1. I have no editing rights on the google docs document. 2. I have logged on melange, but there are no project pages or anything. 3. I may be missing s

Re: [sympy] Google Code-In

2011-11-19 Thread krastanov.ste...@gmail.com
About all the video tutorial tasks and similar: Should we demand the use of IPython or the explicit mention of IPython or something else to that effect. I imagine someone looking at the tutorial saying 'Is this basic python interpreter really the only option?' or 'That output/printing is absolutely

Re: [sympy] Google Code-In

2011-11-19 Thread krastanov.ste...@gmail.com
What is the state of the mentor Id requirement for the tasks? When and how should those be added? On 19 November 2011 15:49, krastanov.ste...@gmail.com < krastanov.ste...@gmail.com> wrote: > About all the video tutorial tasks and similar: Should we demand the use > of IPython or

Re: [sympy] Google Code-In

2011-11-19 Thread krastanov.ste...@gmail.com
ou all about Matrices. These seem like important > tasks that would be doable for high school students. > > -Matt > > > On Sat, Nov 19, 2011 at 9:39 AM, krastanov.ste...@gmail.com < > krastanov.ste...@gmail.com> wrote: > >> What is the state of the mento

  1   2   3   4   5   6   7   >