- Join over
**1.5M+ people** - Join over
**100K+ communities** - Free
**without limits** - Create
**your own community**

- 20:04proy87 opened #18010
- 16:27JSS95 edited #18009
- 16:27JSS95 opened #18009
- 15:51dsenech opened #18008
- 15:02jksuom commented #17990
- 13:36
- 13:27Gagan6164 closed #18007
- 13:24ting2313 starred sympy/sympy
- 12:48jksuom commented #17974
- 11:53sympy-bot commented #18007
- 11:53Gagan6164 opened #18007
- 11:133ndz starred sympy/sympy
- 07:51
- 07:23sachin-4099 commented #11802
- 07:04proy87 opened #18006
- 05:192Bear starred sympy/sympy
- 04:03
- 04:03ChrisPattison starred sympy/sympy
- 03:52ChrisPattison commented #12453
- 03:48ChrisPattison commented #12453

Polynomial methods do not work well with floating point coefficients. The coefficients of a polynomial f can be made rational by

`F = nsimplify(f, rational=True)`

. Then the roots of F can be found by`roots(F, extension=I)`

. (The flag tells that the coefficient domain is the rational field`I`

.)

Aah, Alright thanks for the clarification. I fed the coefficients to `numpy.roots`

to get the solutions!

I have a pretty complicated expression as an integrand, and I want to integrate it numerically although I have to wrap some of the inner parts in UnevaluatedExpr to avoid choking the expression manipulation routines.

What sort of transformations does autowrap apply? .doit() or simplify? Can I get it to evaluate a definite integral numerically or am I stuck with autowrap'ing the integrand and applying scipy.quad?

should I just be using Theano?

I just synced my local fork of sympy with the master branch. When I run `bin/test`

I get the following error:

```
MacBook-Pro:sympy meganly$ bin/test
Traceback (most recent call last):
File "bin/test", line 105, in <module>
import sympy
File "/Users/meganly/sympy/sympy/__init__.py", line 64, in <module>
from .concrete import *
File "/Users/meganly/sympy/sympy/concrete/__init__.py", line 2, in <module>
from .summations import summation, Sum
File "/Users/meganly/sympy/sympy/concrete/summations.py", line 3, in <module>
from sympy.calculus.singularities import is_decreasing
File "/Users/meganly/sympy/sympy/calculus/__init__.py", line 4, in <module>
from .singularities import (singularities, is_increasing,
File "/Users/meganly/sympy/sympy/calculus/singularities.py", line 21, in <module>
from sympy.solvers.solveset import solveset
File "/Users/meganly/sympy/sympy/solvers/__init__.py", line 11, in <module>
from .solvers import solve, solve_linear_system, solve_linear_system_LU, \
File "/Users/meganly/sympy/sympy/solvers/solvers.py", line 542
SyntaxError: Non-ASCII character '\xe2' in file /Users/meganly/sympy/sympy/solvers/solvers.py on line 543, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
```

Any ideas what's wrong for me locally?

can you open an issue for it

the problem will go away if you use Python 3, which is recommended as we will be dropping Python 2 support in a month or so

you can use

`python3 bin/test`

either way this is a bug that should be fixed. it looks like there is a unicode dash in a docstring.

what is concerning is that the test suite didn't fail on Travis

Regarding the earlier question, it looks like the Rational constructor returns Half or Integer as relevant

at the end of

`Rational.__new__`

I think you would need to override

`__new__`

in your class and have it not do that
something along the lines of

```
obj = super(DecimalRational, self).__new__(p, q)
if not isinstance(obj, DecimalRational):
obj = Expr.__new__(cls)
obj.p = p
obj.q = q
return obj
```

or Rational(1, 2) that isn't equal to S.Half.

but you have to use it when extending sympy like this

it's possible that you'd be better off defining a printer just for Rational to print it as a decimal

the issue is if there are cases where you don't want to print it as a decimal

or if you want to mix and match Rational and Decimal then that won't work

but don't want floating point arithmetic errors

just 1/2

so you really only need to check for that

it's possible some things might break with 1/2 because if code checks for

`if x is S.Half`

and `x`

is `DecimalRational(0.5)`

then it won't match
but there don't seem to be too many places in the code that do that, so maybe it won't be a problem

I guess the same code would need to work with Float(0.5) too.

Hi, This is Ashutosh Sharma. I would like to work on issue #17739 as no one has made a PR on it. As a newbie to open source its a bit difficult for me to get started, can someone please help me on it so that I may start contributing.

Hello, I am Dhruv Jain. I am a second-year undergraduate in Electrical Engineering. Studying at the Indian Institute of Technology, Dharwad, Karnataka, India (IIT-DH). I am proficient in git, Python, C/C++, Java, Latex, Differential Equations, and Complex Algebra. I am also eager to start contributing to this community as I love mathematics a lot and sympy deals with it the most. I have a lot of knowledge that can be implemented in sympy. After knowing sympy, I thought it lacks many functions as interactive plots (visualization), Matlab Convolution, shortcuts to solve ODE and PDE (like Legendre and Bessel, etc. ), Transformations: (like Trigonometric, Complex, Laplace, Fourier methods to implement), boundary problems and many more. I'm new to open source development. I'm really interested in contributing to the sympy. I'm also looking forward to GSOC-2020. Can anyone guide me on how to start expressing and contributing to the sympy?

Thank you.

Thank you.

Hi, Please read the contributing guide. In addition, also take a look at README. Take a look at this list for stalled PRs. Feel free to open a new one for continuing one of these.