Denis Akhiyarov | 1 Aug 14:09 2015
Picon

Github issues refer to google code

I see bunch of old issues with references to google code hosting. Isn't google code hosting going to retire
soon? If yes, then maybe these discussions should be copied instead of referencing? 

--

-- 
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/6efbd97d-00be-48ae-abe4-172b830516ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
ahmed751995 | 1 Aug 00:26 2015
Picon

beginner contributer

hi, i finished sympy workflow :) , and that's my first contributing to open source community and first time in writing code in real project 
i entered to issues and i don't know which one can i start (easy to fix)
so, can some one recommend to me a bug for a beginner that can i start learn and work on it?

thanks for reading 

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/ba81f6bc-9bb2-4cfa-aae7-5099effbb035%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Russell Young | 30 Jul 09:10 2015
Picon

solving simultaneous quadratics gives inconsistent results

I'm a newbie with sympy, so this may be something I am doing wrong.

I've written code that finds the intersection of 2 hyperbolas. The equations are correct - when I plot them they are as expected. Using test data where I know there is a solution, sometimes it finds it, sometimes it doesn't. I've found and fixed a few issues so far: no division of python numbers, normalizing the graphs so no numbers are too small, adding a .simplify() call to the equations being solved. Still, it ends up missing solutions. The order the equations are passed to the solve function also affects the solutions found.

Here is some output that describes the hyperbolas, shows the equations, and gives the results:

$ python hyperbola.py -1 0 10.033445 1 1 4.729811 0 -1 7.478488
h12
  a
= 0.792893, b = 0.788239, c = 1.118034
  foci are
Point(-1, 0) and Point(1, 1)
  center
is Point(0, 1/2)
  equation
is -1.60947597191687*(-sqrt(5)*x/5 + 2*sqrt(5)*(y - 1/2)/5)**2 + 1.59063495669236*(2*sqrt(5)*x/5 + sqrt(5)*(y - 1/2)/5)**2 == 1
h13
  a
= 0.381966, b = 0.595065, c = 0.707107
  foci are
Point(-1, 0) and Point(0, -1)
  center
is Point(-1/2, -1/2)
  equation
is 6.8540998039692*(sqrt(2)*(x + 1/2)/2 - sqrt(2)*(y + 1/2)/2)**2 - 2.82404568540787*(sqrt(2)*(x + 1/2)/2 + sqrt(2)*(y + 1/2)/2)**2 == 1
h23
  a
= 0.410927, b = 1.039778, c = 1.118034
  foci are
Point(1, 1) and Point(0, -1)
  center
is Point(1/2, 0)
  equation
is -0.924950593916484*(-sqrt(5)*y/5 - 2*sqrt(5)*(x - 1/2)/5)**2 + 5.92202447335121*(2*sqrt(5)*y/5 - sqrt(5)*(x - 1/2)/5)**2 == 1
h12
and h13: [(2.00000069353477, -1.05724449909221e-7)]
h13
and h13: []

h12
and h23: [(-0.872442811259504, -1.67266454797664), (-0.671975994196070, 0.0582722523367054), (0.819499463572107, 0.688825355380073), (2.00000032674867, 4.62032762769592e-8)]
h23
and h12: [(2.00000032674867, 4.62032762919501e-8)]

h13
and h23: []
h23
and h13: []
$

Parameters for these 3 equations were chosen so that the point (2, 0) is nearly on all of them. It is found in one of the orderings of the first pair, in both of the second pair, and in neither of the third pair.

Following is an excerpt of the code that makes and solves the equation:
_x, _y, _a, _b = symbols('x, y, a, b')
_standard
= Eq(_x**2/_a**2 - _y**2/_b**2, 1)
_degenerate
= Eq(_x, 0)


class Hyperbola(object):
   
def __init__(self, f0, f1, diff):
       
self.foci = [Point(f0), Point(f1)]
       
self.a = S(diff)/2
       
self.c = self.foci[0].distance(self.foci[1])/2
       
try:
           
self.b = sqrt(self.c**2 - self.a**2)
       
except ValueError:
           
print 'Computed minor axis for %s %s %f is imaginary' % (str(f0), str(f1), diff)
           
exit(1)
        theta
, x_temp, y_temp = symbols('theta, x_temp, y_temp')
       
# make equation in standard form
       
self.equation = _standard if self.a else _degenerate
       
self.equation = self.equation.subs({_a: self.a, _b: self.b})
       
# rotate it to the proper orientation
       
self.equation = self.equation.subs({_x: x_temp*cos(theta) + y_temp*sin(theta),
                                            _y
: -x_temp*sin(theta) + y_temp*cos(theta)})\
                                           
.subs({x_temp: _x, y_temp: _y}).\
                                            subs
({theta: self.angle(*self.foci)})
       
# translate to the right position
        center
= self.center()
       
self.equation = self.equation.subs({_x: _x - center.x, _y: _y - center.y})

   
def solve(self, other):
       
# def is_real(x):
       
#     return not x[0].is_imaginary and not x[1].is_imaginary
       
# return [x for x in solve_poly_system([self.equation.simplify(), other.equation.simplify()], [_x, _y]) or []
       
#         if is_real(x)]
       
return [x for x in solve_poly_system([self.equation.simplify(),
                                              other
.equation.simplify()], [_x, _y]) or []]


Am I doing something wrong not to get all the roots? Is there a way to get reliably the intersections of these curves, or is sympy not the right tool for this job? If it isn't, are there any suggestions for what might be better?

Thanks,

russell


--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/b3f72d82-6005-48c4-9741-e421ca764e63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jonathan Crall | 28 Jul 20:32 2015
Picon

How do you disable expression evaluation of matrix multiplication?

I'm using sympy to generate some latex output, and I would like to create an expression by multiplying several matrices, but I don't want it to simply the expression. 


A simple example: 

I have 

x, y, ori = sympy.symbols('x y ori')


T = Matrix([
[1, 0, -x],
[0, 1, -y],
[0, 0,  1]])

R = Matrix([
[ cos(ori), sin(ori), 0],
[-sin(ori), cos(ori), 0],
[        0,        0, 1]])

A = R.multiply(T)

Currently sympy.latex(A) looks something like: 

[[ cos(ori), sin(ori), -x*cos(ori) - y*sin(ori)],
[-sin(ori), cos(ori),  x*sin(ori) - y*cos(ori)],
[        0,        0,                        1]])

But I would like something more like this: 

[[ cos(ori), sin(ori), 0],       [1, 0, -x],
 [-sin(ori), cos(ori), 0],       [0, 1, -y],
 [        0,        0, 1]])      *    [0, 0,  1]]

Is it possible to disable the automatic expression evaluation?


--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/8242732a-f0bd-4510-8198-5ae9fb1c7b34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rajitha | 27 Jul 19:53 2015
Picon

Integral solution


Hi,


I am newbie to sympy, and  trying to find the solution for the following integral, provided with p(x) and p(y), expecting the solution in terms of "f"




I have tried the following with sympy  in sagemath

from sympy import*
from sympy import pi
x, y,  a = symbols('x y a')
f= symbols('f ', cls=Function)
integrate(integrate(Derivative(f(y),y)*(exp(-a*x**2)*cos(y)**2*sin(x)**3), (x, 0, pi)), (y, -pi, pi))

It has shown to be running for quiet long time and finally stopped without any output.

Any help solving the integral will be highly appreciated.

Thanks in advance

Regards,
Rajitha


--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/031a7a41-dd2b-4b13-a971-16299d961a9c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
ahmed751995 | 27 Jul 01:15 2015
Picon

testing development copy

i follow the instructions in workflow ( https://github.com/sympy/sympy/wiki/Development-workflow#virtual-environments ) about testing my sympy environment
and when i try bin /test  

bash: bin/test: Permission denied

why ?

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/5794aea3-e4d8-4dd9-b73a-e0051bf22904%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Paul Royik | 24 Jul 22:09 2015
Picon

mod_wsgi with sympy

Again I'm asking about mod_wsgi.
I'm running some sort of webservice that uses sympy.
Site is running under apache mod_wsgi.

Users access it an everything is fine.
But sometimes when I access the page, it loads too long (even simple example).
It looks like memory used and another query just takes too long to complete.
Server restart fixes everything.

Assuming that my code doesn't use much memory:
1. Is there some problem with sympy and its memory consumption?
2. Is it possible to debug this?
3. Maybe changing apache or mod_wsgi settings will help? If yes, then how?

Any help will be highly appreciated.


Thank you.

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/5b97b36f-3783-433b-830a-eb4c89748613%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
AMiT Kumar | 24 Jul 21:15 2015
Picon

Documenting Solveset: The new 'Solver'

As lot of people are not aware of the purpose of solveset , to answer questions

like why we are doing, what we are doing, We decided to open a PR , to document it. 

Where the community can participate and give their views and suggestions.


If there is anything you would like us to answer about solveset, please add a comment on:

https://github.com/sympy/sympy/pull/9500


Thanks,


AMiT Kumar

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/a5a3274f-abe7-4df6-89f9-1baef80600e3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Daniel Mahler | 23 Jul 21:22 2015
Picon

what is the "new tensor module"

I have seen discussions of new tensor module that did not spell out which module this refers to
Does it refer to sympy.diffgeom or has sympy.tensor been rewritten or ... ?

thanks
Daniel

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/492ef312-7ed4-4fe2-b1b5-3c28f634111f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Denis Akhiyarov | 23 Jul 19:31 2015
Picon

analytical integrate

Sympy cannot do this?

integrate(sqrt(x+sqrt(x)))

BTW, this is computed by SAGE:

-1/12*(3*(sqrt(x) + 1)^(5/2)/x^(5/4) - 8*(sqrt(x) + 1)^(3/2)/x^(3/4) - 3*sqrt(sqrt(x) + 1)/x^(1/4))/((sqrt(x) + 1)^3/x^(3/2) - 3*(sqrt(x) + 1)^2/x + 3*(sqrt(x) + 1)/sqrt(x) - 1) + 1/8*log(sqrt(sqrt(x) + 1)/x^(1/4) + 1) - 1/8*log(sqrt(sqrt(x) + 1)/x^(1/4) - 1)

--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/833581e7-3bc3-43b1-afa4-5b9391956124%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Richard Rondu | 23 Jul 11:23 2015
Picon

Sympy import time

Hi everyone.

I'm upgrading my Qt RPN calculator app for sailfish (https://github.com/lainwir3d/sailfish-rpn-calculator) to use sympy as an engine. 

Everything was well and happy when I was using the sailfish emulator to test the app, but then I decided to finally try it on my Jolla smartphone : the import time of sympy increase to a bit above ten seconds.

While I can manage to deal with ~5seconds, ~10seconds is a bit too much. I was using sympy 0.7.6, I moved yesterday to the master branch hoping it would be better but it's not.

Do any of you have any tips to decrease the import time ? I'm only using for the moment : 

- sympy.S / N
- sympy.cos / acos / sin / asin / tan / atan
- sympy.sqrt / root / log / factorials

I'm defining some custom constants (inheriting NumberSymbol) and some functions (inheriting Function) but I can import them later when needed. What I need to be quickly loaded at startup is mainly sympy.S, the others I can load in the background.

I tried to play a bit with __init__.py, here is the import time of each module on the master :

core=2373
logic=0
assumptions=78
polys=5542
series=0
functions=1
ntheory=2
concrete=1307
simplify=1
sets=0
solvers=0
matrices=0
geometry=349
utilities=0
integrals=0
tensor=0
parsing=2
calculus=21
plotting=177
printing=0
printing2=1
printing3=0
interactive=34
evalf=1
deprecated=8

Polys module is the one taking most of the time. Here is the import time of its submodules :

polytools=2009
polyfuncs=1736
rationaltools=0
polyerrors=1
numberfields=1190
monomials=0
orderings=0
rootoftools=0
polyroots=0
domains=0
constructor=0
specialpolys=1
orthopolys=0
partfrac=467
polyoptions=1
rings=0
fields=33

The import time is the same either with "import sympy" or "from sympy import S"

So, if anyone had any idea / pointers I could look at I would really appreciate it :-) Apart from that, sympy is quite awesome !


Thanks


Richard


--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to sympy-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/d6182b3f-61eb-4925-9cae-088df9151535%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gmane