Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 09:55
    smeunier-amd opened #23517
  • 09:44
    leekiongweijie starred sympy/sympy
  • 05:28
    AmirMotefaker starred sympy/sympy
  • 04:58
    anutosh491 commented #23516
  • 04:31
    eagleoflqj converted_to_draft #23516
  • 04:14
    sympy-bot commented #23516
  • 04:14
    eagleoflqj synchronize #23516
  • 04:09
    sympy-bot commented #23516
  • 04:09
    eagleoflqj edited #23516
  • 04:09
    eagleoflqj labeled #23516
  • 04:08
    sympy-bot commented #23516
  • 04:07
    eagleoflqj review_requested #23516
  • 04:07
    eagleoflqj opened #23516
  • 03:28
    wanburana starred sympy/sympy
  • 03:15
    agryman commented #17945
  • 01:33
    jh-ly starred sympy/sympy
  • May 18 23:32
    eagleoflqj commented #23507
  • May 18 23:13
    romanodev starred sympy/sympy
  • May 18 22:25
    eagleoflqj review_requested #23500
  • May 18 22:24
    eagleoflqj labeled #23515
Anutosh Bhat
@anutosh491
any guidance by someone familiar with doit/concrete module regarding how does doit calculate a basic sum like an infinite geometric series would be great ! Thanks
ThePauliPrinciple
@ThePauliPrinciple
Just wanted to point out that I wrote some ideas/examples in https://github.com/sympy/sympy/discussions/22219 looking forward to any feedback
ThePauliPrinciple
@ThePauliPrinciple
Thanks for the reply @oscarbenjamin !
falematte
@falematte
image.png
I think that I found a bug on the evaluation of the limits of a function that I summarize in this pic. Any tips? I can also provide the code to reproduce it.
Of course L and r are symbols positive defined
falematte
@falematte
I have opened and Issue here, please contribute sympy/sympy#22220
The limit is different in the discontinuity points.
ThePauliPrinciple
@ThePauliPrinciple
I am looking to setup a workflow to work on a pull request. In particular, I am looking for some way to be able to edit the library and then immediately check manually/interactively if I obtained the intended result. For example, to have a conda environment which uses the fork as the source for sympy. Any ideas? I have read through the development workflow document, but I feel I'm missing the point on how to do this effectively.
anonbox.netuser
@anonbox.netuser:matrix.org
[m]
Hi, is sympy 1.9 officially released? I saw it is tagged on github, but the usual files for downloading are missing and pypi also only lists 1.9cr1 as latest version. The sympy.org website is also not helpful in this regard, showing the release of 1.7.1 as latest news.
Anutosh Bhat
@anutosh491
Hi guys , I was solving an issue regarding functions/limits and I came across something which might help . So do we have any method /function in sympy that checks whether some function/expression might encapsulate or bound another expression . Like is there any way I could check something like -1/x < cos(x)/x < 1/x or even one sided
ThanhVu (Vu) Nguyen
@nguyenthanhvuh
Hi, it seems that the .subs function is quite slow. When I have a long expression e (can contain nonlinear terms like x**2, y*x*z), calling e.subs(some_dict) takes quite sometime (a sec or so). In fact subs is often slower than solving for large equations. Am I using subs correctly?
빈백에 박제가 되어버린 로듐을 아시오?
@45Rh_science_twitter
image.png
hi guys i'm new with sympy, so can anyone help me with solving this problem?
I was trying it on my own, but i can't get a grip on how to solve this Error
image.png
import sympy as sp
from sympy import exp, oo

sp.init_printing()

x = sp.Symbol("x")
a, m, h = sp.symbols("a, m, h", positive = True)
A = sp.Symbol("A")

f = exp(-2 * a * m * x**2 / h)
int_f = sp.integrate(f, (x, 0, oo))

eq1 = 2 * (abs(A))**2 * (int_f) - 1

print(sp.solve(eq1, A))
ThePauliPrinciple
@ThePauliPrinciple
A = sp.Symbol("A",real=True) seems to give a solution (although I have not verified it is the correct solution)
빈백에 박제가 되어버린 로듐을 아시오?
@45Rh_science_twitter
I'll give it a try thanks!
wow it works thank u!!!!
Henry smith
@Henrysm41987301_twitter
Hello all. Henry here , I'm using sympy for the first time for one of my course project reports at my University. The course is based on series and summations overall and while trying to get familiar I realized that Sum((-1)**(x+1) + (-1)**(x+2) , (x, 1, oo)).is_convergent() is not returning the expected result and raises a TypeError saying Invalid NaN comparison , is this a meaningful error or Am I missing something useful ?Maybe I could raise an issue ?
anonbox.netuser
@anonbox.netuser:matrix.org
[m]
Try: sym.simplify(sym.Sum((-1)**(x+1)+(-1)**(x+2),(x,1,sym.oo)))
So basically try to simplify the expression, may yield some more insight also in other cases.
Anutosh Bhat
@anutosh491
@Henrysm41987301_twitter hey Thanks for pointing this out . No need to raise an issue ,there is a fix for similar errors in sympy/sympy#22200 which is currently being reviewed by @oscargus and others .Maybe after that is fixed you could use this expression!
Henry smith
@Henrysm41987301_twitter
Thanks for the suggestions
ThePauliPrinciple
@ThePauliPrinciple
tests finished: 9644 passed, 436 skipped, 355 expected to fail, 4 expected to fail but passed, in 2343.62 seconds <- this means there is nothing wrong correct?
1 reply
ThePauliPrinciple
@ThePauliPrinciple
What is the logic in sympy for when to import at the top of a module or inside the code?
Kalevi Suominen
@jksuom
@ThePauliPrinciple Imports should preferably be at the top of a module but sometimes they lead to circular imports and then those must be put in a function or method in order to delay the import.
ThePauliPrinciple
@ThePauliPrinciple
That makes sense, thanks!
ThePauliPrinciple
@ThePauliPrinciple
Ah, I had no choice in the first place, I was doing a circular import anyways
Steven Lee
@stevenleeS0ht
What is the latest progress of migrating sympy-live from python 2 to python 3?
ThePauliPrinciple
@ThePauliPrinciple
I notice a lot of old issues and pull requests, is there any procedure for getting them closed? E.g. by replying with a comment showing that it is no longer an issue/something similar has already been merged into sympy?
1 reply
ThePauliPrinciple
@ThePauliPrinciple
When we create an undefined function using Function(name), it is possible to add attributes to it using kwargs, e.g. F=Function('F', foo=bar), which will expose F.foo, as well as consider it a different function if foo is not the same. I'm looking for similar behaviour when subclassing Function, is there a way to do so?
ThePauliPrinciple
@ThePauliPrinciple
in particular I want foo to not be in F.args
Rohit Nagar
@nagar2817
Heyy!!! I am a newbie to the open-source, I need to Contribute to your project. How can I contribute to your organization?? Need help!!
1 reply
Anutosh Bhat
@anutosh491
Guys , how can I use simplify() without changing factorial to a gamma function . I want to simplify it without affecting the factorial
ThePauliPrinciple
@ThePauliPrinciple
I don't think it is the best solution, but I find that substituting what I want untouched with a Symbol, then simplifying and then substituting back to often help in those cases
It might help if you create the symbol with the same assumptions as whatever you are substituting
lesshaste
@lesshaste
How do you solve simultaneous diophantine equations in sympy? For example 5x+6y+8z==1 and 6x-11y + 7z ==9
lesshaste
@lesshaste
it looks like you need to do https://stackoverflow.com/a/65438529/2287805
it would be great if this was all inside diophantine
Megan Ly
@meganly

Last year expansion was causing slowdowns in the .equals method. In sympy/sympy#19673 we had

In [10]: e1 = 100*(x**3 + 1)**99                                                                                                               

In [11]: e2 = 300*x**2*(x**3 + 1)**99                                                                                                          

In [12]: %time e1.equals(e2)                                                                                                                   
CPU times: user 1.13 s, sys: 9.37 ms, total: 1.14 s
Wall time: 1.15 s
Out[12]: False

It seems like the .equals method has gotten faster. Anyone know what's changed?

Yashvardhan Prasad
@yasphy
Which easy to fix issues can I resolve now and how do I see if they are still open to be solved or not?
2 replies
lesshaste
@lesshaste
@yasphy There are quite a lot of things. It might depend how easy you want it to be
Yashvardhan Prasad
@yasphy
Any example to elaborate??
lesshaste
@lesshaste
@yasphy for example systems of linear diophantine equations.
they have code but it just isn't reviewed and merged
Yashvardhan Prasad
@yasphy
Ok..thanks for the response