Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 09:00
    0sidharth commented #23539
  • 08:59
    0sidharth commented #23539
  • 07:24
    boomboomjassi commented #7049
  • 06:11
    Jhyun-Ahn starred sympy/sympy
  • 05:26
    github-actions[bot] commented #23035
  • 05:11
    github-actions[bot] commented #23462
  • 05:10
    github-actions[bot] commented #23462
  • 04:38
    s-hanko commented #22429
  • 04:37
    s-hanko commented #22429
  • 04:22
    eagleoflqj assigned #23551
  • 04:22
    eagleoflqj labeled #23551
  • 04:22
    eagleoflqj opened #23551
  • 04:14
    asmeurer commented #23462
  • 04:11
    asmeurer commented #23462
  • 04:10
    sympy-bot commented #23035
  • 04:10
    sympy-bot commented #23035
  • 04:10
    eagleoflqj synchronize #23035
  • 04:06
    eagleoflqj converted_to_draft #23035
  • 03:58
    sympy-bot commented #23462
  • 03:58
    sympy-bot commented #23462
Mohit Gupta
@mohitacecode
Sorry I meant that I want to apply as mentor.
2 replies
Kalevi Suominen
@jksuom
I think that it would suffice to add one's name to this mentor list: https://github.com/sympy/sympy/wiki/GSoC-Ideas#potential-mentors
Mohit Gupta
@mohitacecode
Okay, thanks @jksuom
aplund
@aplund:matrix.org
[m]
Can anyone help me with this NotAlgebraic exception: https://gist.github.com/aplund/888da79a96fb295e7d614f43780119f9
Miguel Salazar de Troya
@salazardetroya
Hello, can sympy be used to nondimensionalize equations? Like it is done here: https://en.wikipedia.org/wiki/Non-dimensionalization_and_scaling_of_the_Navier%E2%80%93Stokes_equations . Basically, replace the variables with their nondimensional counterparts and lump the parameters into nondimensional numbers. Thanks.
Ivan
@Tookser
Hello!
What is the best way to interpret something like 'a+b+c' as syntaxic tree of depth 3, not 2? In other words, how to make expression tree become binary-unary?
3 replies
AndoBando
@AndoBando
Should cse work for tensors? I have some big Christoffel symbol I want to lambdify with cse, but i don't think it has any effect. If I flatten it it works fine.
faze-geek
@faze-geek
What is the best way to simplify a rational expression in SymPy . simplify(),cancel() ....etc etc there are many methods but I want to one which is the least costly.
orbisvicis
@orbisvicis:matrix.org
[m]

According to the docs it depends on the expression to be simplified. You might need to provide some assumptions for your symbols and in general avoid simplify() if cost is a concern.

https://docs.sympy.org/latest/tutorial/simplification.html

Gaurav Dhingra
@gxyd

Hi all,

I'm trying to use SymPy's parse_latex function to parse mixed-fractions. But the issue that's happening is, the tree representation of mixed-fraction is same as if the integer part of mixed fraction were getting multiplied with fractional part of the mixed fraction.

Minimal code example:

>>> from sympy.parsing.latex import parse_latex
>>> from sympy import srepr
>>> e1 = "1 \\frac{1}{3}"
>>> e2 = "1 \\times \\frac{1}{3}"
>>> expr1 = parse_latex(e1)
>>> expr2 = parse_latex(e2)
>>> print(srepr(expr1))
Mul(Integer(1), Pow(Integer(3), Integer(-1)))
>>> print(srepr(expr2))
Mul(Integer(1), Pow(Integer(3), Integer(-1)))

>>> srepr(expr1) == srepr(expr2)
True

(possible solution): Is writing a transformation rule the best possible solution to tackle this? https://docs.sympy.org/latest/modules/parsing.html#parsing-transformations-reference

Anutosh Bhat
@anutosh491
Hello All,
My Gsoc proposal (Improving series Expansions and Limit Computations) is almost about complete (just 3- 4 code snippets need to be added and I'm just finalizing them and some reframing if any ). I've received a basic review from the potential Mentor and also a decent to good review from the potential co-mentor . I would like to request for a second iteration of reviews from the org members and members related to the series/limits module in particular .
The proposal is exhaustive enough for a 175 hour project, to leave some room for bug fixes and implementations if I finish early . Hence I would also like to request if the members could validate the timeline proposed as that was a bit confusing for me to frame . Also now Gsoc projects can be extended to 22 weeks (midway) than the standard 12 week project , so like how do I consider or integrate this if required with the proposed timeline in my proposal?
The link to the proposal is https://docs.google.com/document/d/1Cx7IaAkmxp1f81efSPNpMtkNE6K4NgkhkI_2TLjTEE8/edit#
All suggestions are welcome
Christopher Smith
@smichr
Does anyone know what sort of matrix analysis involves checking to find a plausible subset of variables for which a solution might be found for an underdetermined system (more variables than equations)? A trivial case would involve a diagonal system: a solution for variables on the diagonal is possible. But if it's not a diagonal system what method without actually solving equation -- just working with position of non-zero elements in the matrix -- is used to tell if a solution is plausible or not?
Christopher Smith
@smichr
I see unanswered question here except for a numerical system. But I am considering plausibility of the sysmbol, not numeric, case.
faze-geek
@faze-geek
Can some one help me on auto simplification of trigo identities in SymPy .For example I want sin(x)2 + cos(x)2 -1 to simplify and give me 0 in a expression ( to prevent self from returning as ouput )
Kalevi Suominen
@jksuom
@faze-geek This is for simplification of trigonometric expressions: https://docs.sympy.org/latest/modules/simplify/fu.html#sympy.simplify.fu.fu
Christopher Smith
@smichr
Is there a canonical way to tell if two matrices are the same except for permutation of rows and columns?
Christopher Smith
@smichr
Hmm...I hadn't asked exactly that way yesterday but today I find this.
Varenyam Bhardwaj
@airpods69
I was wondering if anything is supposed to be done for sympy/sympy#23336
It does seem do-able but i might need a little guidance with it
Chen Tao
@jagt

Folks I have a expression I don't know how to simplify:

from sympy import *
from sympy.abc import w, x, y, z

expr = (w - x) * (x - y) + (y - z) * (z - w)
expanded = expand(expr)
back = factor(expr)

I want back to be something similar to expr. I tried factor/simplify/cancel and stuff and seems non of these works.
Anyone know what should I try?

Kuldeep Borkar Jr
@KuldeepBorkar

Hi @jagt factor() takes a polynomial and factors it into irreducible factors over the rational numbers. Note: factors may not be irreducible if the input is no longer a polynomial over the rationals.

To confirm what will be the factors you can do the following:
factor_list() instead of factor which will return the expected factors or output of factor() in a more structured way.

Chen Tao
@jagt
@KuldeepBorkar I tried factor_list which doesn't work in my case. I assume factor_list and factor have similar functionality but rather different output?
SamG-01
@SamG-01
Why are the DifferentialOperator and qapply functions specific to the sympy.physics.quantum.operator package and to Wavefunction objects? I feel like differential operators would be useful to have as a more general tool for all types of functions, not just Wavefunctions.
Micah
@micahscopes
anyone else noticing that the documentation is down?
Liumeo
@eagleoflqj
Screenshot from 2022-04-20 23-48-08.png
SymPy Beta supports dark theme now!
Talos878
@Talos878
Wooo!!
HeroCC
@HeroCC

Hi all, I had a quick question on covariance calculations. I'm no expert, but for some reason Sympy is different than what I'd expect. I'm probably using the wrong function somewhere. Here is a quick snippet:

covariance(FiniteRV('Jimmy', density={-.20: .40, .30: .60}), FiniteRV('Walter', density={.40: .40, -.20: .60}))
# expect -0.072

And the equation I'm using: https://wikimedia.org/api/rest_v1/media/math/render/svg/18143cb5b668ff2cc739385a5916d9317bb74df0

HeroCC
@HeroCC
I'm no stats genius so please excuse me if there is a better RV to be using here
HeroCC
@HeroCC
Another example:
q2rush = FiniteRV('Rush', density={-0.25: .30, 0.35: .70})
q2oberman = FiniteRV('Oberman', density={0.45: .30, -0.17: .70})

covariance(q2rush, q2oberman)
(.30 * (-0.25 - E(q2rush))*(0.45 - E(q2oberman))) + (.70 * (0.35 - E(q2rush))*(-0.17 - E(q2oberman)))
Constantin Mateescu
@costica1234_twitter
I'm totally disappointed with how slow sympy is at finding the angle between lines that are given in terms of points with symbolic coordinates. Is there a flag to disable symbolic computation across all sympy objects? Having to remember to call .evalf() is far from ideal... I had to spend a great deal of time understanding why my code was running incredibly slow.
Liumeo
@eagleoflqj
Screenshot from 2022-04-27 00-41-44.png
Initial LaTex input support added to SymPy Beta
Ivan Petukhov
@satels
@eagleoflqj Get url of this site, pls?
Liumeo
@eagleoflqj
sympy-beta.vercel.app Not stable on iOS, tested on Win/Linux/macOS/Android
Richard Fuhr
@rdfuhr

The following code plots the graph of a simple piecewise-constant function f
such that f(x) = 1 for x between 0 and 1
and f(x) = -1 for x between 1 and 2
and f(x) = 0 otherwise.
In this plot, the graph is plotted for x between -1 and 3.
However, vertical lines are drawn at the values of x where there are discontinuities.
Is there a way to plot the graph of this function such that the vertical lines (which should not be part of the graph) are not drawn?

from sympy import symbols
from sympy.plotting import plot
from sympy import Piecewise
x = symbols('x')
s = Piecewise((1, (x >= 0) & (x <= 1)), (-1, (x >= 1) & (x <= 2)), (0, True))
plot(s,(x,-1,3))

Figure_1.png
Above is the graph that is generated by the above code.
Lin Hsu
@chaosink
Seems I cannot integrate (x**2+1)**-1.5
Liumeo
@eagleoflqj
Whenever possible, use rational instead of float. integrate((x**2+1)**(-S(3)/2))
Liumeo
@eagleoflqj
Screenshot from 2022-05-04 22-40-03.png
3D plot support for binary function added to SymPy Beta
Lin Hsu
@chaosink
Thanks! @eagleoflqj
Saksham ALok
@Saksham-13
Hello,
My name is Saksham(19), I am a first-year computer science student who has just ventured into open source. Sympy intrigued me as it is a python based alternative to MATLAB which has been a little irritating to use in my college coursework.
I have some experience in python and have built bots and projects using different libraries but have never worked on something of this size. I am hoping to find some lead here to see what to work on and where to learn the required prerequisites for that. Please guide me regarding this matter. Also, I would be giving this work first priority after my internals ends in 5 days.
Thanks
PS... My first PR got merged
ETHEM UZER
@ethemuzer777_gitlab
With the help of this modified version, you can configure the privacy of your chats in much more detail and completeness. Hide activity status, double check, forward reminders, and more. Also change the theme of the application and translate the messages you receive in the chat window. Everything is possible with WhatsApp Plus Red : https://modpree.com/whatsapp-plus-rojo/
Christopher Smith
@smichr
@costica1234_twitter what problem are you trying to solve that you need to find the angles? I wonder if this would be of interest: sympy/sympy#22644
Liumeo
@eagleoflqj
Screenshot from 2022-05-20 00-14-32.png
SymPy Beta now plots for unary complex function
Gaurav Dhingra
@gxyd
Something that might be helpful for people here:
https://github.blog/2022-05-19-math-support-in-markdown/
fmwaapps
@AppsFmwa_twitter
With this modified version, you can configure the privacy of your chats in much more detail and completeness. Hide activity status, double check, forward reminders, and more. Also change the theme of the application and translate the messages you receive in the chat window and much more. Everything is possible with FmWhatsApp: https://fmwaapps.com
euphrates
@euphrates:matrix.org
[m]
Hello!