Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Sep 12 01:39

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function


  • Sep 11 12:19

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Implemented leading term and ns… (compare)

  • Sep 10 03:21

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    made changes (compare)

  • Sep 08 06:28

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    added tests for leading terms f… (compare)

  • Sep 08 03:43

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Changed the outputs being retur… (compare)

  • Sep 07 09:34

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Changed leading term being ret… (compare)

  • Sep 07 07:27

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Removed Redundant block from le… (compare)

  • Sep 07 02:44

    anutosh491 on GSoC_Pr4.3_Implementing_some_series_method_for_uppergamma_lowergamma_expint_and_other_errors_functions

    Implemented some series methods… (compare)

  • Sep 06 16:44

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Removed Order term (compare)

  • Sep 06 11:39

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    added test cases for limits and… (compare)

  • Sep 06 10:51

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    Implemented leading term and ns… (compare)

  • Sep 06 10:40

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions


  • Sep 06 04:13

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    This commit does the following … Refactored mrv_leadterm in grun… Fixed errors arising for limits… and 3 more (compare)

  • Sep 06 02:08

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    fix(integrals): handle degenera… functions: Generalised Dirichle… author: update Megan Ly in .mai… and 23 more (compare)

  • Sep 05 14:16

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Changed if condition for bessel… (compare)

  • Sep 05 02:49

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Improved code quality (compare)

  • Sep 03 10:24

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    changed is function to equality… (compare)

  • Sep 03 10:14

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    fixed failing tests (compare)

  • Sep 01 12:23

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Fixed code quality (compare)

  • Sep 01 12:00

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Added case where number of term… (compare)

Anutosh Bhat
Hey guys , I am approaching an issue from the series/concrete module which requires a really small contribution of the solverset module which I haven't explored much yet . Hence I wanted to confirm what whether there is any way to solve something like x = sin(x) or x = log(x) ,x = e**x . First one should return 0 in the Real domain and the other 2 should return an empty set . solveset() method returns something like ConditionSet(x, Eq(x - sin(x), 0), Complexes), ConditionSet(x, Eq(x - exp(x), 0), Complexes) which is not wrong but not what I would like and solvify returns Not implemented for these !
What assumptions do you have for x?
1 reply
Ashton Bradley
Hi all... something I can't find in docs: if I get a conditional expression returned, how to I select the expression for the case that applies for my variables?
Screen Shot 2021-10-22 at 9.20.19 PM.png
I only want the "otherwise" result
Andreas Schuldei
hi, are user questions ok here?
Judging from scrollback, they are. :-)

I need to create a vector function in sympy with actual vectors, that can be transformed between coordinate systems.

I saw this https://stackoverflow.com/questions/46993819/how-to-create-a-vector-function-in-sympy which uses Matrix() as a workaround.

I need to transform my input and output vector from one coordinate system to another (and back). How are vector functions done in that case?

def B_el(r_vec):

    r1 = r_vec.i

    r2 = r_vec.j
    u = sin(r1)+cos(r2)
    v = -cos(r1)+sin(r2)
    return Matrix([u, v, 0])
Andreas Schuldei
formatting broken?
Depending on what you "vector" is, it will transform differently under a coordinate transform
e.g. a velocity and a coordinate transform completely differently with a non-linear coordinate transformation
And in the case of a velocity, you could have it transform covariantly or contravariantly
Andreas Schuldei
the input vector is a radius, so distance and direction. the output vector is a magnetic field vector.
so it is just the geometic transformation. split up the three spatial components differently, maintain the size
part of the task is to identify the coordinate transformation - the rotation angels and location vector. But that comes later, after having figured out how to write a vector function :-)
Andreas Schuldei
I still am unclear as to how to return a vector
def B_el(r_vec):

    r1 = r_vec.i

    r2 = r_vec.j
    u = sin(r1)+cos(r2)
    v = -cos(r1)+sin(r2)
    return Matrix([u, v, 0])
What would i need to change in order to return a vector, which can be transformed into a different (also resting) coordinate system, differing in axis rotations and a location shift?
Hello, I am a new member to SymPy. I look forward to contributing to SymPy as a developer. Do we have different channels for SymPy users and developers?
Andreas Schuldei
Traceback (most recent call last):
  File "C:/Users/Andreas Schuldei/PycharmProjects/lissajous-achse/hgü-kabel-detektion-symbolic.py", line 109, in <module>
    result = solve(equations, (CM0, theta_i, theta_j, theta_k, i, a, B_earth))
  File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\solvers\solvers.py", line 1096, in solve
    solution = _solve_system(f, symbols, **flags)
  File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\solvers\solvers.py", line 1730, in _solve_system
    i, d = _invert(g, *symbols)
  File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\solvers\solvers.py", line 3118, in _invert
    rhs -= indep
  File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\numbers.py", line 2194, in __sub__
    return Rational.__sub__(self, other)
  File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\decorators.py", line 89, in __sympifyit_wrapper
    return func(a, b)
  File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\numbers.py", line 1725, in __sub__
    return Number.__sub__(self, other)
  File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\decorators.py", line 89, in __sympifyit_wrapper
    return func(a, b)
  File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\numbers.py", line 733, in __sub__
    return AtomicExpr.__sub__(self, other)
  File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\decorators.py", line 251, in _func
    return func(self, other)
  File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\decorators.py", line 126, in binary_op_wrapper
    return f(self)
  File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\core\decorators.py", line 127, in binary_op_wrapper
    return func(self, other)
  File "C:\Users\Andreas Schuldei\PycharmProjects\lissajous-achse\venv\lib\site-packages\sympy\vector\basisdependent.py", line 352, in __rsub__
    raise TypeError("Invalid argument types for subtraction")
TypeError: Invalid argument types for subtraction
How can I inspect the individual equations in the list equations to narrow this down? The equations are relatively long, and I have no clue how to find this.
Sean Logan
Hello, I have discovered a bug with sympy.vector.divergence() when used in cylindrical coordinates
divergence( R rhat) gives 2, the correct answer. But divergence( 1 rhat) gives 0. Wrong! The correct answer is 1/R
N = CoordSys3D('N', transformation='cylindrical', vector_names=("r", "phi", "z"), variable_names=("R", "PHI", "Z"))
R = N.R
rhat = N.r
The channel isn't as active as it should be. You might be better off with the mailing list
Anutosh Bhat
Should using subs back and forth make any difference mathematically ? This is for cases having log where I have seen this multiple times
>>> (log(0/a)).subs(a, 0)
>>> (log(b/a)).subs(a, 0).subs(b, 0)
>>> (log(b/a)).subs(b, 0).subs(a, 0)
Aman Thakur
#22416 I have made my first PR. I need help regarding that it has not been merged
hello.. I am very new to open source development.. I wanted to ask if I can directly start contributing my cloning the repository and then commit the changes or I need to fork it first and then start working on it?
1 reply
Aditya Vats
Can anyone tell me where the code for finding a function's domain or range is implemented? In case it varies for the type of function, I need the one for trigonometric functions.
Anutosh Bhat
Hello guys , I am working on couple of Pr's extending the functionality of the doit method in the concrete module , I noticed that one inconsistency leads to couple of errors . Product(1, (n, 1, oo)).doit() returns 1 and 1**oo returns NaN. Other integers work as expected . These expressions are equivalent right ??? or am I missing something !
Kalevi Suominen
@anutosh491 The expressions are not equivalent. The infinite product is the limit of finite partial products Product(1, (n, 1, N)) = 1 as N tends to oowhile 1**oo is the limit of f(x)**g(x) as f(x) -> 1 and g(x) -> oo. See the docstring of Pow.
Anutosh Bhat
Thanks for the help ! Now I realize what information was I ignoring !
Anutosh Bhat
Hey guys ! I am working on a Pr based on the as_leading_term() method of core/expr.py (specifically on multivariable cases) . I would be glad if someone could clarify whether (1/x + y).as_leading_term(x) and (1/x + y).as_leading_term(y), both should give back 1/x as the ouput !!

:point_up: November 9, 2021 2:19 AM
yes, i believe that 1/x would be the lowest order term of both series expansions (when expanding around x it is the x^-1 term, when expanding around y it is the y^0 term): https://github.com/sympy/sympy/blob/00d6469eafdd4aac346a0b598184c15f2560dbe5/sympy/core/expr.py#L3411-L3445

it's a poorly named function. leading term to me means the part of the polynomial with the highest order, not the lowest order part of a series expansion.

i have a question myself! i have been trying to solve a toy special relativity problem using sympy https://colab.research.google.com/drive/12JptFSkLoyzwjnpFaCaNmA-2jKNsKcCQ .
one question i had is regarding the solver. in my problem, i have vectors $\hat{m} and $\hat{n}$, parameterized by sympy symbols. when i try to add the constraint that m + n = 0 to the solver, it pretty much never finishes. if i straight up get rid of the symbols for m and define it as m = -n however, the solve finishes quickly and gets the solution as expected
is there anything i am doing wrong in using the sympy solver?

Is there any solution not to evaluate double equals ('==')?
Here is my simplified example:

from sympy.parsing.sympy_parser import parse_expr
expr = parse_expr('a == 1 + a', evaluate=False)

That returns False. It seems to be flag evaluate=False is ignored.
But, operation for ex. '<=' works 'properly' (for me) and returns:

>>> expr
a <= a + 1
>>> expr.func, expr.args
(<class 'sympy.core.relational.LessThan'>, (a, a + 1))

I need operation '==' has '<=' behavior during parsing with flag evaluate=False and return:

 >>> expr.func, expr.args
(<class 'sympy.core.relational.Equality'>, (a, a + 1))

Please, help solving my problem.

George Bisbas

Dear all at Sympy, congrats on your work!
I am trying to use sympy Min/Max to evaluate a set of variables.
I have looked at: https://docs.sympy.org/latest/modules/functions/elementary.html#min

a, b, c, d (we have no knowledge for them)
sympy.Max(a,b,c,d) = Max(a,b,c,d)

In case I have the hypothesis that a>c can I somehow get
sympy.Min(a,b,c,d) = Min(a,b,d) ?
Any help appreciated,

Nicholas Chisholm

I seem to have found a wrong result when evaluating dx/x\int dx/|x|.

>>> x = symbols('x', real=True)
>>> integrate(1/abs(x), x)
Piecewise((-log(x), x <= 0), (nan, True))

The expected answer is sgn(x)log(x)sgn(x) \log(|x|) except at x=0, where it is undefined (nan). Sympy gives nan for all x>0. Is this a known issue? I couldn't find one on Github. Just checking so I do not open a duplicate bug report.

Anutosh Bhat
I can see, couple of issues regarding integrate giving wrong output for functions closely related to 1/x . Closely related in the sense that they can be obtained after some modification or transformations on 1/x but even I haven't been able to spot the above issue . Maybe you should report ?? @nchisholm
could somebody tell me which open source testing system sympy uses?
I recently created a file in sympy/doc/src/tutorial as non_commutative.rst.
I tried running tests on this file in jupyter lab

import sympy

i tried on my forked folder of sympy

it keeps saying True even though my PR #22503 shows one error
Kuldeep Borkar Jr

Hello SymPy Community,
My name is Kuldeep Borkar I am pursuing B.tech currently and just started
using sympy a few days ago and now I would love to make contributions
towards SymPy.

Before contributing I just:

--> Visited the SymPy documentation.
--> Completed the tutorial available on it.
--> Forked the repository.
--> Cloned the repository.
--> Read the Contributing Guidelines, Style Guide, CODE_OF_CONDUCT.

Shall I now start making contributions or there's something I shall know before initiating?
and yes if I have some queries will it be okay if I ask here itself?

@shilpiprd The failing test shows traceback
name "symbols" is not defined etc . I think you may need to import the required function you have used before the code in documentation.
@KuldeepBorkar https://github.com/sympy/sympy/wiki/Development-workflow was really useful to me