Stefan Krastanov | 21 May 2013 14:27
Picon
Gravatar

wrong result with series

the factor before x**5 in

(asin(sqrt(x))**2).series(x,0)

seems to be incorrect (according to mathematica)



reported here https://code.google.com/p/sympy/issues/detail?id=3842

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Chris Smith | 21 May 2013 11:57
Picon
Gravatar

Re: args invariant

This might have been so before the abstract base classes and the numeric tower implemented in 2.5 or 2.6, but now Python itself has a definite interface for checking any object whether it is complex number, real, rational or integer.

But we support unlimited precision reals, too. If we went to only Python types then that would mean using something like Fraction or Decimal instead.  But when doing computations with those we might/would need to recast them as mpmath numbers.

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Nishant Mandapaty | 21 May 2013 02:25
Picon

Google Summer of Code

Hi,


My name is Nishant and I am currently a senior in a high school near Chicago. I will be an undergrad at Berkeley next year. At this point, I want to major in Electrical Engineering and Computer Science. 
Last summer, I worked with the SuLab in the Scripps Research Institute and made a Google App game on AppEngine called Mobianga in Python. This also helped me learn a lot about HTML, JavaScript, and the skills needed to work on big projects, such as repositories and version control. During my junior year in high school, I took AP Computer Science, which taught me Java as well as basic programming concepts. I really enjoy programming - I'm doing it for fun over the summer!
I was really interested in some of the Google Summer of Code ideas, specifically parsing or working on live or gamma, or a mobile app. I took a vector and multivariate calculus class this year, if that helps. I am sure that many aspects will challenge my capabilities, but are there any parts of those ideas or any others, that I could work on? I just would really appreciate a chance to work on some real-life coding. I thought I would just take the chance and ask! 

Thanks,
Nishant

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Aaron Meurer | 20 May 2013 22:25
Picon
Gravatar

args invariant

I think Matthew wanted to delay this discussion until the end of the
summer, but I'd like to start it now while it is fresh on my mind.  I
am currently writing the expression manipulation part of the new
tutorial (http://docs.sympy.org/tutorial/tutorial/manipulation.html),
and this issue is central to my discussion.

There has been some discussion from time to time about the invariants
that SymPy objects are supposed to follow.  The invariants are
something like "all elements of an object's .args should be instances
of Basic" and "all Basic objects should be rebuildable from their
args, like obj.func(*obj.args) == obj".

The main discussion has been about the first one. Should we allow
non-Basic args?  The common example if Symbol.  Currently, Symbol('x')
has empty args.  The proposal would make Symbol('x').args be ('x',).
The same for Integer. Integer(2).args is just (), but the proposal
would make it (int(2),).

But notice that the two invariants as I stated them above are
inconsistant, because Symbol('x') is not rebuildable from its args
unless its args are ('x',).

I have started a wiki page to gather my thoughts on this at
https://github.com/sympy/sympy/wiki/Args-Invariant.  Basically, I
think there are basically two ways that we should go, which are called
option 1 and option 3 on the wiki page (option 2 is something I think
we should throw out immediately).  The question boils down to what a
leaf in an expression tree is. The rest follows from that.  The
options are

1. Any non-Basic
3. Any object with empty args

If we choose option 1, then the invariant becomes `obj.func(*obj.args)
== obj`. If we choose option 2, then the invariant becomes `obj.args
== () or obj.func(*obj.args) == obj`.

Now, I don't think it's any secret that I prefer option 3, and that
some people in the community (namely Matthew and Stefan) have been
arguing for option 1, but I think we should work out all the
differences, and pick the best one.

So without making this email twice as long as it already is, I refer
you to the wiki page, where I've started an extensive comparison of
the two options.  Feel free to edit it to add more pros/cons,
examples, or to fix the formatting.

I've also created a section of the wiki page on the bottom for
opinions. Please keep the main part to facts, and put your opinions at
the bottom.  We can also discuss opinions here on the mailing list.

Aaron Meurer

--

-- 
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+unsubscribe@...
To post to this group, send email to sympy@...
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.

Björn Dahlgren | 20 May 2013 11:33
Picon

real=True as argument to Function

Hi,

Consider:

In [12]: sympy.log(sympy.exp(sympy.Symbol('x',real=True)))
Out[12]: x

In [13]: sympy.log(sympy.exp(sympy.Symbol('x')))
Out[13]: log(exp(x))

In [14]: sympy.log(sympy.exp(sympy.Function('f')(sympy.Symbol('x'))))
Out[14]: log(exp(f(x)))

In [15]: sympy.log(sympy.exp(sympy.Function('f', real=True)(sympy.Symbol('x'))))
Out[15]: log(exp(f(x)))

I would expect sympy to print f(x) in Out[15]. Is there a work around / is this easily implemented?

Cheers,
/Björn

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Alexander Schneider | 20 May 2013 03:30
Picon

Surface_color

So I'm plotting two separate 3d parametric graphs that look similar using plot3d_parametric_surface

I wanted to change the surface color, so here's what it said for surface_color "surface_color: Function which returns a float. Specifies the color for the surface of the plot. See sympy.plotting.Plot for more details."


Under plot, it says: surface_color : function which returns a float

Which really isn't much more helpful. How would I use something like that?

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Aaron Meurer | 20 May 2013 02:31
Picon
Gravatar

solve() questions

I'm writing the part of the new tutorial on solve().  I have some questions

- What is a good example of an equation that has a solution, but which
cannot be represented symbolically (as an example of when solve()
might return no solutions for this reason)?

- I thought we decided to remove NotImplementedError from solve(). Or
was that just None?

- The lack of a consistant return type is killing me. It seems the
type depends not just on whether you are solving one or two equations,
but also on the *type* of the equations!

In [5]: solve([x - 1, y - 1], [x, y])
Out[5]: {x: 1, y: 1}

In [6]: solve([x**2 - 1, y - 1], [x, y])
Out[6]: [(-1, 1), (1, 1)]

Is there a reason that we don't set `dict=True` by default, at least
for systems of equations?

I'm tempted to not even discuss solving systems of equations at all,
because the lack of a consistant return type would just make the
discussion too confusing for new users (and embarrassing for us).

Aaron Meurer

--

-- 
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+unsubscribe@...
To post to this group, send email to sympy@...
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.

Lucas Wilkins | 19 May 2013 19:40
Picon
Gravatar

Cyclic groups

Is there an implementation of cyclic groups ready made somewhere?


:L

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
F. B. | 19 May 2013 14:42
Picon

Exp map of DifferentialOperator

I already posted this idea, but now I'm stuck because I don't know exactly how to code the algorithm.


The idea is to implement the exponential map of DifferentialOperator, which is widely used in physics. e.g.:

On function of one variable, examples:

exp( epsilon * DiffenetialOperator( diff( g(x), x ), g(x) ) ) * f( x ) ===> f( x + epsilon )
exp( epsilon * DiffenetialOperator( x*diff( g(x), x ), g(x) ) ) * f( x ) ===> f( x*exp(epsilon) )
exp( epsilon * DiffenetialOperator( x**2 * diff( g(x), x ), g(x) ) ) * f( x ) ===> f( x / (1-epsilon**x) )

On functions of more variables, examples:

exp( epsilon * DifferentialOperator( x*diff(g(x,y), y) + y*diff(g(x,y), x), g(x,y) ) ) * f(x, y) ===> f(cosh(epsilon)*x + sinh(epsilon)*y, sinh(epsilon)*x + cosh(epsilon)*y)
---> similar example for rotations (SO(2) group).

Well, I have identified a few cases where an algorithm would be straightforward, such as the first three examples, and multivariable cases such as exp( epsilon* ( sum a_i x_i D_{x_j} ) ), which corresponds to a square matrix exponentiation (x_i and D_{x_j} identify matrix element, whose value is a_i), and which would be easy to code.

But, what about exp( epsilon * x**3 * diff_operator(_x) ) f( x ) ? Or more generally, exp(epsilon * x**n * diff_operator(_x) )?

What about mixed exp( epsilon * (x**2 diff(_y) + x*y**3 diff(_x) ) ) ?

What about higher degree diffs, such as exp( epsilon * diff(_x, 2) ) ?


Do you have any ideas how to solve this problem?

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Raul Gallegos | 17 May 2013 16:03
Picon
Gravatar

How to run `setup.py test` from specific point

Hi Community,

I was testing the whole sympy project with PyPy and it threw a segmentation fault error, so I only have the log until: sympy/printing/pretty/tests/test_pretty.py[57]

I want to know if I can resume the testing from that point until the end. How could I run this?

Thank you.

--
Raul O. Gallegos Hidalgo

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Shayan javani | 17 May 2013 09:59
Picon

Unable to import sympy

Hi
I'm a newbie in SymPy world and I should say I didn't have a warm welcome!
When I try to import SymPy or anything from it,I get the following message:

Traceback (most recent call last):
  File "<stdin>",line1,in <module>
  File "C:\Python33\lib\site-packages\sympy\__init__.py",line 20,in <module>
       from sympy.core import *
  File "C:\Python33\lib\site-packages\sympy\core\__init__.py",line 4,in <module>
      from sympify import sympify
ImportError: No module named 'sympify'

What should I do?

Thanks

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
Visit this group at http://groups.google.com/group/sympy?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Gmane