Re: Issue 3879 in sympy: Ellipse uses pyglet plotting

2013-06-11 Thread sympy
Comment #1 on issue 3879 by julien.r...@gmail.com: Ellipse uses pyglet plotting http://code.google.com/p/sympy/issues/detail?id=3879 Might want to fix the precatuion typo as well. -- You received this message because this project is configured to send all issue notifications to this

Re: Issue 3877 in sympy: subs should recognize powers with exponent 1

2013-06-11 Thread sympy
Comment #3 on issue 3877 by smi...@gmail.com: subs should recognize powers with exponent 1 http://code.google.com/p/sympy/issues/detail?id=3877 That might not work if Pow._eval_subs is expecting self to have base and exp attributes. -- You received this message because this project is

Issue 3882 in sympy: divisors() is not type-consistent

2013-06-11 Thread sympy
Status: New Owner: Labels: Type-Defect Priority-Medium New issue 3882 by trel...@psu.edu: divisors() is not type-consistent http://code.google.com/p/sympy/issues/detail?id=3882 Ran into a bug today with divisors() The issue is that divisors() is not consistent in the type of the factors

Re: Issue 3882 in sympy: divisors() is not type-consistent

2013-06-11 Thread sympy
Comment #1 on issue 3882 by asmeu...@gmail.com: divisors() is not type-consistent http://code.google.com/p/sympy/issues/detail?id=3882 Issue 1973 would have made the set thing work. I would just make the output always be Integer. It is a SymPy function after all. -- You received this

Issue 3883 in sympy: powdenest should not do too much

2013-06-11 Thread sympy
Status: Valid Owner: Labels: Type-Defect Priority-Medium Simplify New issue 3883 by asmeu...@gmail.com: powdenest should not do too much http://code.google.com/p/sympy/issues/detail?id=3883 Maybe there's a good reason for it, but why does powdenest also call powsimp? In [28]:

Issue 3884 in sympy: Polygon should raise an error if sides cross

2013-06-11 Thread sympy
Status: Valid Owner: Labels: Type-Defect Priority-Medium New issue 3884 by smi...@gmail.com: Polygon should raise an error if sides cross http://code.google.com/p/sympy/issues/detail?id=3884 When Polygon gets crossing sides, it silently gives something else

Re: Issue 3877 in sympy: subs should recognize powers with exponent 1

2013-06-11 Thread sympy
Comment #4 on issue 3877 by asmeu...@gmail.com: subs should recognize powers with exponent 1 http://code.google.com/p/sympy/issues/detail?id=3877 Or if the logic is not too complicated we could just reimplement it in Symbol for the special case of exp = 1. -- You received this message

Re: [sympy] Re: The Vectors and Electromagnetism GSoC projects

2013-06-11 Thread Stefan Krastanov
about immutability and reference frame: I guess I do not understand the details of what you describe. Anyway, I will not be against immutability if it does not mess up with `__eq__` and `__hash__` so it depends on the implementation. about Vector: if it is not a subclass of Expr it will not be

Re: [sympy] Re: The Vectors and Electromagnetism GSoC projects

2013-06-11 Thread Sachin Joglekar
Can we define our own simplify method for Vector that simplify(Vector) will call? Also, if Vector will is a subclass of Expr, how can we avoid something like unit_vector * unit vector or Scalar+Vector? On Tue, Jun 11, 2013 at 1:40 PM, Stefan Krastanov krastanov.ste...@gmail.com wrote: about

Re: [sympy] Re: The Vectors and Electromagnetism GSoC projects

2013-06-11 Thread Gilbert Gede
For an example of successive rotations, check out the second code block here: http://docs.sympy.org/0.7.2/modules/physics/mechanics/examples.html Regarding Vector, should the user being to perform any action they could on another Expr object on a Vector object? If it inherits from Expr, would

Re: [sympy] Re: The Vectors and Electromagnetism GSoC projects

2013-06-11 Thread Stefan Krastanov
You can define and _eval_simplify method: That is cool. But many such methods will have to be defined and most of the time it will be just copy pasting from Expr with maybe minor changes. Fixed done to the core or changes of api will have to be redone for Vector. And many sympy methods simply

Re: [sympy] Re: The Vectors and Electromagnetism GSoC projects

2013-06-11 Thread Sachin Joglekar
Maybe we could subclass from Basic, maybe even Expr. We should just ensure *wrong* operations on Vectors return an error. (One of which Gilbert mentioned) Stefan, could you put up your idea of the API for the stress test on the wiki? That would give us (Prasoon and me) a direction. On Tue, Jun

Re: [sympy] Re: The Vectors and Electromagnetism GSoC projects

2013-06-11 Thread Stefan Krastanov
I will do it in the evening. And obviously my suggestions can be flawed, but I will try to explain why I prefer it in places where it differs from what you suggest. -- You received this message because you are subscribed to the Google Groups sympy group. To unsubscribe from this group and stop

[sympy] Re: The Vectors and Electromagnetism GSoC projects

2013-06-11 Thread Prasoon Shukla
Let us get some things clear here. Vector is going to be subclassed from Basic. Also, after seeing the discussions/problems above, Vector + Vector will give an Add on which we can call something akin to a .doit() to result in a Vector. I do not see any problems with this approach. Next,

Re: [sympy] Re: The Vectors and Electromagnetism GSoC projects

2013-06-11 Thread Sachin Joglekar
@Prasoon, Vector + Vector is fine. What about vector * vector or scalar + vector or any other such nonsense operation? If you are going to subclass from Basic, this can be done with handling of the operators as I have already pointed out. But how we will do this without operator overloading in

Re: [sympy] Re: The Vectors and Electromagnetism GSoC projects

2013-06-11 Thread Matthew Rocklin
I'm only skimming over this thread but I noticed that the Basic/Expr question came up. MatrixExpressions used to inherit from Expr for exactly the reasons Stefan said (lots of things work out of the box). This was great for startup but eventually became a major pain. At some point I rewrote

Re: [sympy] Re: The Vectors and Electromagnetism GSoC projects

2013-06-11 Thread Stefan Krastanov
This is also one of the ways to go forward. I personally dislike it because: - A non trivial amount of functionality needs reimplementation (flatten for instance) - We do not have standard correct way to interface with functions like factor, symplify, had, get, atoms, etc, so it is hard to be

Re: [sympy] Re: The Vectors and Electromagnetism GSoC projects

2013-06-11 Thread Matthew Rocklin
A non trivial amount of functionality needs reimplementation (flatten for instance) True, however I think you'll find that flatten does things that you don't want. Much of the Expr code makes scalar assumptions that might not apply. I tried to generalize some of my work in matrix expressions

Re: [sympy] Re: The Vectors and Electromagnetism GSoC projects

2013-06-11 Thread Stefan Krastanov
What does it mean to factor vectors exactly? I was thinking about a*unit_vector + b*unit_vector - (a+b)*unit_vector But as you said there are many others that do not make sense for vectors. In contrast the other way has proven to work in physics.quantum. They're both reasonable. And also

Re: [sympy] Re: The Vectors and Electromagnetism GSoC projects

2013-06-11 Thread Matthew Rocklin
On Tue, Jun 11, 2013 at 10:14 AM, Stefan Krastanov krastanov.ste...@gmail.com wrote: What does it mean to factor vectors exactly? I was thinking about a*unit_vector + b*unit_vector - (a+b)*unit_vector My solution was the generic version in sympy/strategies/rl.py. This particular operation

[sympy] Finding out if an expression is algebraic

2013-06-11 Thread Manoj Kumar
I was working out the second heuristic of the Maple paper along with Sean, and the PR can be found here -- https://github.com/sympy/sympy/pull/2156 Firstly, the thing is I need to extract factors (according to the Maple Paper) a} that are algebraic b} and are either a function of

Re: [sympy] Finding out if an expression is algebraic

2013-06-11 Thread Aaron Meurer
What do you mean by algebraic? There is is_polynomial or is_rational_function. Aaron Meurer On Tue, Jun 11, 2013 at 12:54 PM, Manoj Kumar manojkumarsivaraj...@gmail.com wrote: I was working out the second heuristic of the Maple paper along with Sean, and the PR can be found here --

Re: [sympy] Re: The Vectors and Electromagnetism GSoC projects

2013-06-11 Thread Gilbert Gede
Prasoon, That option does not work for ReferenceFrame. If I have a ReferenceFrame A, and another ReferenceFrame B, and want to set the angular velocity of B in A as w_1*b_1 + w_2_* b_2 + w_3 * b_3 I need access to the basis vectors of B, which I won't have until after the frame is initialized.

Re: [sympy] Re: The Vectors and Electromagnetism GSoC projects

2013-06-11 Thread Aaron Meurer
I am catching up here, so just some random comments on things that were mentioned: - Regarding the quantum module, they actually went the opposite route from MatrixExprs. Originally, they used their own QAdd, QMul, etc., but then later it was changed to use the core Add, Mul, etc. I don't

Re: [sympy] Finding out if an expression is algebraic

2013-06-11 Thread Manoj Kumar
On Wed, Jun 12, 2013 at 12:33 AM, Aaron Meurer asmeu...@gmail.com wrote: What do you mean by algebraic? There is is_polynomial or is_rational_function. I was referring to this, http://en.wikipedia.org/wiki/Algebraic_expression, is_Polynomial wouldn't work if I want to identify cases like

Re: [sympy] Finding out if an expression is algebraic

2013-06-11 Thread Aaron Meurer
is_rational_function could easily be extended to handle such cases (one just needs to allow rational instead of integer exponents). Aaron Meurer On Tue, Jun 11, 2013 at 10:48 PM, Manoj Kumar manojkumarsivaraj...@gmail.com wrote: On Wed, Jun 12, 2013 at 12:33 AM, Aaron Meurer

[sympy] Current Progress in my project.

2013-06-11 Thread Saurabh Jha
Hi, As some of you know, I am working on matrix module nowadays. I have written about my progress in previous week in [1]. Unfortunately, I cannot get in on sympy planet because my current PR is from my master branch. After that PR is merged, I'll send a PR for my blog feed. FWIW I have posted it