Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:00
    codecov[bot] commented #17875
  • 11:38
    czgdp1807 commented #17875
  • 11:37
    czgdp1807 commented #17875
  • 11:32
    czgdp1807 synchronize #17875
  • 10:43
    czgdp1807 labeled #17871
  • 10:43
    czgdp1807 labeled #17871
  • 10:37
    sympy-bot commented #17875
  • 10:37
    czgdp1807 edited #17875
  • 10:37
    czgdp1807 closed #17595
  • 10:37
    czgdp1807 commented #17595
  • 08:52
    dream-fall starred sympy/sympy
  • 08:33
    czgdp1807 commented #17846
  • 08:09
    jksuom commented #17846
  • 04:54
    christianlanx starred sympy/sympy
  • 03:30
    asmeurer commented #17879
  • 00:33

    oscarbenjamin on master

    Update version in master to 1.6… Merge pull request #17878 from … (compare)

  • 00:32
    oscarbenjamin closed #17878
  • 00:31
    codecov[bot] commented #17878
  • Nov 11 23:51
    codecov[bot] commented #17666
Adoa Coturnix
@adoa

I have a problem with calculating eigenvectors for a simple 3x3 matrix in sympy. Trying to execute

q = symbols("q", positive=True)
m = Matrix([[-2, exp(-q), 1], [exp(q), -2, 1], [1, 1, -2]])
#m.eigenvects(simplify=True)
m.eigenvals()

results in very complicated expressions for the eigenvalues, trying to get the eigenvectors fails with a NotImplementedError. I expect the latter to be due to the former. However, when trying to do the same thing in Mathematica, I get much simpler expressions for everything. Is there some option / flag that I can set to have sympy compute these eigenvalues and eigenvectors? Is there currently some form of limitation within sympy that prevents me from doing this?

Het Patel
@hetp111
what are all the prerequisite i need to have before contributing to opensource (sympy) ? I have a pretty good hold of python now. Github is very confusing for me.
Aaron Meurer
@asmeurer
It helps to understand git/github, but generally the best way to learn them is to use them
@adoa does Mathematica give a simpler expression for the eigenvalues?
Oh apparently they can be simplified if you call simplify
Het Patel
@hetp111
@asmeurer Ty, do i need to learn git or github? is learning github enough? i have never done opensource before, should i start with sympy?
Aaron Meurer
@asmeurer
You need to learn the basics of git, to download the code and push it up to GitHub
@adoa it seems there is a simplify flag, but it doesn't work
Het Patel
@hetp111
@asmeurer can't i do it manually through github website?
Kalevi Suominen
@jksuom
I suspect that there is not enough support for simplifying hyperbolic functions.
This may help you
Aaron Meurer
@asmeurer
@adoa I opened sympy/sympy#15118 for your issue
Het Patel
@hetp111
@Malkhan52 Thank ypu,
Aaron Meurer
@asmeurer
Het Patel
@hetp111
@asmeurer I am using windows, will i have any problems? or do i need linux?
Aaron Meurer
@asmeurer
You can use windows.
You should use whichever you feel more comfortable with
Het Patel
@hetp111
I am aiming for GSoC 2019, what is the procedure?
(sorry for these silly questions... I am trying my best ,i just need some guidance )
Malkhan Singh
@Malkhan52

I'm getting this error '''>>> expr = cos(x)

expr.subs(x-1,y)
cos(x)
expr = cos(x+1)
expr.subs(x-1,y)
cos(y + 2)
'''

where will it be in code?

Aaron Meurer
@asmeurer
Somewhere in the core
I guess it's because Add does the smart substitution but Symbol does not
The cosine is irrelevant. It's the same with x.subs(x - 1, y) vs. (x + 1).subs(x - 1, y)
Malkhan Singh
@Malkhan52
yeah that's why i'm searching subs()
Malkhan Singh
@Malkhan52
got that in basic.py
Aaron Meurer
@asmeurer
Subs is implemented on the different classes in _eval_subs
So Symbol._eval_subs should do the same thing as Add._eval_subs.
Adoa Coturnix
@adoa
@asmeurer: I am somewhat confused regarding the simplification. Apparently there is a difference between simplify(a_list) and [simplify(element) for element in a_list]. With the latter, I get the same expressions as in Mathematica, the former does not simplify at all o_O. In any case: thanks for opening the issue :-)
Aaron Meurer
@asmeurer
I don't know why simplify returns a list unchanged. In general, though, you shouldn't rely on SymPy functions automatically vectorizing over lists
Ashwin Shenoy
@Ashwin-Shenoy-NITK
In the ellipse class, do hradius & vradius represent the semi-major axis length & semi-minor axis length respectively ?
It's a bit unclear in the docstring. I take it they are being represented as radius vectors from the origin along the major & minor axis ?
Akshit Srivastava
@akshitt
Hi I am Akshit, fresher in CS at Indian Institute of Technology, Bombay. Could someone guide me to a basic level bug to start with?
I have some basic level knowledge in Python, FLINT, NumPy
Het Patel
@hetp111
@akshit1511 Hi, i am also new, i'll tell you what i'll be doing to get started, first of all i'll learn to use git and github and then https://github.com/sympy/sympy/wiki has a lot of information on how to start
@akshit1511 Tell me if i am missing something.
Akshit Srivastava
@akshitt
@hetp111 try reading this instead http://try.github.io/
Het Patel
@hetp111
@akshit1511 I'll try. Thanks!
Yatna Verma
@yatna
Printing latex(pi) yields to \\pi whereas the correct representation in LaTex should be just \pi , is the extra '\' a bug or requirement?
Sidhant Nagpal
@sidhantnagpal
"\\pi" is correct. \\ is used to escape \.
Yatna Verma
@yatna
okay, thanks
Kalevi Suominen
@jksuom
'\\pi' is the representation of the (internal) Python string created by latex(pi). You can use print(latex(pi)) to see how the output will appear in the LaTeX source.
Divyam Sharma
@divyam102
what level of python is required in order to contribute for sympy?
Björn Dahlgren
@bjodah

I'm trying to hunt down where in my code I'm using a now deprecated sympy function. I'm using pytest & python 3.7 and I'm looking at the python docs. This should work, but I can't seem to make it trigger:

$ PYTHONWARNINGS='ignore,error:::sympy' PYTHON=python3.7 PYTHONPATH=~/vc/sympy ./scripts/run_tests.sh chempy/util/pyutil.py
==== 6 passed, 1 skipped in 0.53 seconds ====
/home/bjorn/vc/sympy/sympy/matrices/matrices.py:2491: SymPyDeprecationWarning: 

Dot product of non row/column vectors has been deprecated since SymPy
1.2. Use * to take matrix products instead. See
https://github.com/sympy/sympy/issues/13815 for more info.

  useinstead="* to take matrix products").warn()

if I change the PYTHONWARNINGS environment variable to simply error::DeprecationWarning it triggers way before actually running the tests:

Traceback (most recent call last):
...
  File "/opt/py37/lib/python3.7/site-packages/_pytest/assertion/rewrite.py", line 6, in <module>
    import imp
  File "/opt/py37/lib/python3.7/imp.py", line 33, in <module>
    DeprecationWarning, stacklevel=2)
DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses

does anyone know the proper syntax to specifically turn SymPy warnings into errors?

(I also tried PYTHONWARNINGS='ignore,error::DeprecationWarning:sympy' and a few other combinations to no avail)
Aaron Meurer
@asmeurer
I think use SymPyDeprecationWarning instead of DeprecationWarning
Björn Dahlgren
@bjodah
Thanks, tried that too, it spits out Invalid -W option ignored: unknown warning category: 'SymPyDeprecationWarning' and tests still pass.
Aaron Meurer
@asmeurer
Really it has to be a known category?
Björn Dahlgren
@bjodah
Looks like it, also tried:
PYTHONWARNINGS='error:::sympy[.*]'
PYTHONWARNINGS='error::DeprecationWarning:sympy[.*]'
Aaron Meurer
@asmeurer
Well warnings.filterwarnings should work. I think we use that in SymPy itself