Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 06:06
    oscargus commented #22335
  • 04:57
  • 04:21
    maruthinh starred sympy/sympy
  • 04:14
    sympy-bot commented #22211
  • 04:13
    eagleoflqj synchronize #22211
  • 04:09
    sympy-bot commented #22211
  • 04:09
    eagleoflqj synchronize #22211
  • 03:24
    anutosh491 commented #22334
  • 03:02
    smichr commented #22335
  • 02:47
    anutosh491 commented #22334
  • 02:37
    bocklund commented #22286
  • 01:52
    github-actions[bot] commented #22316
  • 01:43
    smichr commented #22327
  • 01:26
    eagleoflqj commented #22169
  • 00:37
    skieffer commented #22316
  • 00:36
    sympy-bot commented #22316
  • 00:36
    sympy-bot commented #22316
  • 00:36
    skieffer synchronize #22316
  • Oct 20 21:16
    oscarbenjamin commented #22336
  • Oct 20 21:13
    oscarbenjamin commented #22327
Craig Russell
@ctr26
There can be issues parallelizing things with SymPy because of serialization bugs.
@asmeurer K so, the best way to do this is by serialising a function that wraps lambidfy rather than creating your lambidfied function first then trying to serialise that. Thi is working for me in task nicely
def numba_func(consts):
    model = sp.lambdify(tuple(consts.keys()),integral,"mpmath")
    return model(*tuple(consts.values()))

out = client.map(numba_func, consts_list)
result = client.gather(out)
Aaron Meurer
@asmeurer
I don't know how well lambdify functions serialize because they are dynamically created
But other than that, they do not involve SymPy expressions, so they might actually serialize better
Craig Russell
@ctr26
The above code works well with dask as the lambification runs on the workerrs
Aaron Stiff
@AaronStiff
I'm investigating #20762, and I'm pretty sure it's an issue with ANTLR. I've been looking at LaTeX.g4 to see how it handles subscripts, and everything seems correct. The only potential problem I've found is this:
subeq: UNDERSCORE L_BRACE equality R_BRACE; supeq: UNDERSCORE L_BRACE equality R_BRACE;
Not sure if this could be causing the problem, but could anyone familiar with ANTLR comment on whether or not supeq should be using CARET instead?
Sayandip Halder
@sayandip18
I was going through plot.py and came across the check_arguments() function here. Though I sort of understand how it works, I still don't understand it's purpose. The docstrings aren't much of a help either. Can someone tell me why the function behaves that way?
10mayje
@10mayje
hello, I am Tanmay Mondal a second-year student of nit Durgapur, West Bengal, India. I am expressed in python, Django. How can I get started?
Aaron Meurer
@asmeurer
@AaronStiff I think that issue is unrelated to parse_latex. It is parsing the expression right. python() just doesn't print it right.
1 reply
Craig Russell
@ctr26
Anyone know why this simplfies to 0, it doesn't in mathematica?
import sympy as sp
from sympy.concrete.summations import Sum

sp.Derivative(Sum(sp.exp(x*sp.sin(n/m)),(n,1,m)),x).simplify()
Craig Russell
@ctr26
This works fine:
Sum(sp.Derivative(sp.exp(x*sp.sin(n/m)),x),(n,1,m)).doit()
Aaron Meurer
@asmeurer
Looks like it is a bug
Something weird is happening here
>>> Sum(exp(x*sin(n/m)),(n,1,m))
Sum(exp(x*sin(n/m)), (n, 1, m))
>>> Sum(exp(x*sin(n/m)),(n,1,m)).doit()
Piecewise((m*exp(c3_), Eq(exp(c2_), 1)), ((exp(c2_) - exp(c2_*(m + 1)))*exp(c3_)/(1 - exp(c2_)), True))
Alex Nguyen
@rxng8
Hi I'm new to sympy. I hope I can go with sympy and contribute from now on
I have a few questions: when we rebuild the repo after making changes, does the repo get re-install again or only the modified part get installed? How do we run test on a single test case? How do we log the info from the test case when testing (is there any params when build that has to be added?). Sorry for the long questions!
Aaron Meurer
@asmeurer
You don't have to build SymPy because it is pure Python. If you installed from git, you will have to install again unless you did a pip install -e or setup.py develop. Although I personally just run Python directly from the sympy directory. That does not require reinstalling, as it will just import the development version of SymPy directly.
To run the tests on a single case, you can pass in the file name like ./bin/test test_solvers.py, and use -k to select a specific test like ./bin/test -k test_whatever
I'm not sure about the log question. The output is printed to the screen. You don't have to do anything special to run the tests.
Alex Nguyen
@rxng8
Well that's great helps, thanks a lot !
Harshit Yadav
@hyadav2k
Hi, can someone tell me how can we add a new function in sympy, beacuse on directly adding, and then calling in terminal gives NameError and says that function called is not defined. Thanks!
Naveen Sai
@naveensaigit
@hyadav2k If you open python in the same working directory as the repo you clone, you can import the sympy you made changes to without any problems
Craig Russell
@ctr26

Looks like it is a bug

Thanks aaron!

Nisarg Chaudhari
@Nisarg-Chaudhari
Hello everyone, I'm Nisarg Chaudhari, a second year computer science undergrad, studying at BITS Pilani Hyderabad Campus, India. I am familiar with python and made some personal projects with it (mainly small games with pygame). I would like to contribute to SymPy. This is my first time contributing to open source, currently going through "Introduction to contributing" in sympy wiki. Is there anything else I need to know to get started?
Harshit Yadav
@hyadav2k

@hyadav2k If you open python in the same working directory as the repo you clone, you can import the sympy you made changes to without any problems

Thanks for sharing @naveensaigit!

Naveen Sai
@naveensaigit

@hyadav2k If you open python in the same working directory as the repo you clone, you can import the sympy you made changes to without any problems

Thanks for sharing @naveensaigit!

No problem!

Aaron Stiff
@AaronStiff
I'm just running some tests in the printing module, but even without making any changes to any files, pytest is reporting 8 failed tests. Is this normal?
Thomas Aarholt
@thomasaarholt
What are the failures?
I'm not familiar with the sympy ones, but over at hyperspy we often have test failures due to mismatches on matplotlib versions when testing generated images
That said, if you go to the github master, you can see that the red cross implies that the master branch is currently not passing tests
Aaron Stiff
@AaronStiff
image.png
Thomas Aarholt
@thomasaarholt
Are you getting something ala "SyntaxError: invalid escape sequence \e"?
None of those are failing :)
Aaron Stiff
@AaronStiff
They aren't?
Thomas Aarholt
@thomasaarholt
Unless you've done something to your colorscheme
Red = failures, yellow is just that it output a warning.
Aaron Stiff
@AaronStiff
I get this at the end: 844 passed, 61 skipped, 8 xfailed, 1 xpassed, 1 warning in 7.50s
Thomas Aarholt
@thomasaarholt
xfailed are "allowed/expected failures"
Aaron Stiff
@AaronStiff
Oh! That makes sense. Thanks.
Thomas Aarholt
@thomasaarholt
You're welcome!
Zachariah Etienne
@zachetienne
Sympy Travis is failing atm; sympy-dev appears to be pretty badly broken (AssertionError: {'sympy.polys.matrices'}). Any news on when it'll be fixed?
Sayandip Halder
@sayandip18
>>> sympify(0.0) == S.false
True
>>> S.false==sympify(0.0)
False
What's the reason for this behaviour? Shouldn't the latter be True too?
12 replies
Thomas Aarholt
@thomasaarholt
What does sympify(0.0) evaluate to?
I agree that it seems odd
(and what does S.false evaluate to?)
Sayandip Halder
@sayandip18
sympify(0.0) is sympy.core.numbers.Float whereas S.false is sympy.logic.boolalg.BooleanFalse
che2712
@che2712
Hello everyone, I'm Cheshta Babbar, a fourth year undergrad, studying at BITS Pilani. I would like to contribute to SymPy. This is my first time contributing to open source, currently going through "Introduction to contributing" in sympy wiki. Please guide me.
Suryam Arnav Kalra
@suryam35
Hi @che2712 , you can start with https://github.com/sympy/sympy/wiki/Introduction-to-contributing for starters, and then you can refer to the docs https://docs.sympy.org/latest/index.html. For the later part, refer to https://github.com/sympy/sympy/wiki/Development-workflow.
Ganesh C K M
@ckmganesh
Hey, there . If have a idea proposal or a feature proposal , Can I talk about it here
Ganesh C K M
@ckmganesh
@asmeurer This is just an idea I thought would be useful if implemented. Maclaurin's series is one of the most used series today but if we have to find it using existing methods, we have to manually find using derivative at every single point. But a separate module or inbuilt function would come really handy. The user will pass Maclaurins(function_name) and the function can return the coefficients as an array. This can save a lot of time if implemented . Any suggestion would be of great help. Hoping for a reply :)