Where communities thrive


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

    anutosh491 on GSoC_Pr4.2_Implementing_leading_term_and_series_methods_for_the_frac_function

    (compare)

  • 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

    (compare)

  • 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)

Parnabrita Mondal
@hitblunders
f = x
maximum(f, x)
this gives me infinity. what exactly this means? The question might be a bit silly. But I am beginner here.
almighty123789
@almighty123789
@hitblunders Hi, I am assuming you understand what does maximum () does. If not, here's a simple explanation: it returns the maximum value of the function, in your case the function is x. You can also change the domain as per your requirement. Here's the relevant link
https://docs.sympy.org/latest/modules/functions/elementary.html
Parnabrita Mondal
@hitblunders
@almighty123789 thank you!
Benoit Martin
@metabsd
image.png
Hi, There a way to solve this with Sympy ? Thx in advance!
almighty123789
@almighty123789
@metabsd yeah there definitely is
x = symbols('x')
f = (6*x+13)/(15) - 2*x/5 -(3*x+5)/(5*x-25)
solveset(f,x) # OUTPUTS 20
Link to sympy tutorial https://docs.sympy.org/latest/tutorial/index.html
Constantin Mateescu
@costica1234_twitter
I have two PR's which have more or less been reviewed so far: sympy/sympy#20915 and sympy/sympy#20916. Would appreciate if someone could finally approve those rather small changes.
Benoit Martin
@metabsd
@almighty123789 Can I see the handcals ?
Benoit Martin
@metabsd
I also try to use sympy to find x,y with those example
image.png
almighty123789
@almighty123789

@metabsd

x,y = symbols('x y')
eq1 = 12/x - 4/y -2
eq2 = 3/x - 2/y 
solve([eq1,eq2],(x,y)) # OUTPUTS [(3,2)]

I am assuming by handcals you mean hand calculations, afaik this is not possible.

Dhrubajyoti Kumar
@stallionz-arch
hi, I am dhrubajyoti interested in contributing can any one help me how to get started
S.G. Janssens
@sgjanssens
Hi, I am also new to contributing, but I believe this is the relevant link.
aplund
@aplund:matrix.org
[m]
If I have an expression like ax + at + bx - bt, how do I ask sympy to factor this so that it has terms like x+t and x-t and not a+b and a-b.
Ehren Metcalfe
@ehren

@aplund:matrix.org you could work with multivariate polynomials (instead of expressions) so that you can specify the polynomial variables e.g.

>>> from sympy import *
>>> a, b, t, x = symbols("a b t x")
>>> expr = a*t + a*x - b*t + b*x
>>> factor(expr)
a*t + a*x - b*t + b*x
>>> Poly(expr, a, b)
Poly((t + x)*a + (-t + x)*b, a, b, domain='ZZ[x,t]')
>>> Poly(expr, t, x)
Poly((a - b)*t + (a + b)*x, t, x, domain='ZZ[a,b]')

Alternately, you could stick with expressions and use collect e.g.

>>> collect(expr, [a, b])
a*(t + x) + b*(-t + x)
>>> collect(expr, [t, x])
t*(a - b) + x*(a + b)
aplund
@aplund:matrix.org
[m]
oh... that's the way to use collect.
Kuldeep Borkar Jr
@KuldeepBorkar
I am new here for making contributions, I just checked the issues tab but I think there are no good first issue or easy issue to solve can anyone help me then how should I start making contributions
aplund
@aplund:matrix.org
[m]
is there a nice way to perform these manipulations deeper in the syntax tree? I've got expressions like exp(ax + at + bx - bt), but collect won't work inside the exponential. Do I just have to manually rebuild the syntax tree?
Ehren Metcalfe
@ehren
yeah sounds like you'd have to manually rebuild via replace or bottom_up
Hantao Cui
@cuihantao

Does anyone use sympy with numpy and dill? The following code does not work when numpy gets upgraded to 1.20.1 but works fine with numpy=1.19. Running SymPy 1.7.1 and dill 0.3.3.

import dill
import sympy
from sympy.abc import x

dill.settings['recurse'] = True

expr = sympy.sympify('re(x)')

lfunc = sympy.lambdify(x, expr, 'numpy')

with open("out.pkl", 'wb') as f:
    dill.dump(lfunc, f)

RecursionError: maximum recursion depth exceeded while calling a Python object

The issue occurs when re or im appears in an expression. Changing re to functions such as log works. Any clue about a fix?

aplund
@aplund:matrix.org
[m]
any idea why this expands the exponential: im(exp(-(x-t)**2)exp(I(x-t)))
I thought it would just leave the first exponential untouched (x and t are real).
Sayandip Halder
@sayandip18
Eq(x**2, True) returns False. But Eq(x,True) does not. What is the reason for this behaviour?
aplund
@aplund:matrix.org
[m]
sayandip18: sorry, ,what's x here?
oh.. I c.
False**2 is int(0)
and True**2 is int(1)
so neither is equal to true.
Aaron Meurer
@asmeurer
@sayandip18 Eq doesn't really make any guarantees about when it will evaluate. Both expressions are nonsense in some sense, since the lhs is an expression and the rhs is a boolean. Eq is only designed to work with expressions, so it's not surprising it does weird things if you put a boolean in it.
If anything, it is correct. x can also be a boolean in the current design, so x could be True
@cuihantao can you open an issue for this. We would need to investigate it to see what is going on. It's not even clear if the issue is in sympy, numpy, or dill.
almighty123789
@almighty123789
>>> f = 4 +sqrt(2)*x + 5*x**2
>>> f = f.as_poly()
>>> f
Poly(5*x**2 + x*(sqrt(2)) + 4, x, sqrt(2), domain='ZZ')
>>> f = 4+1.414*x + 5*x**2
>>> f = f.as_poly()
>>> f
Poly(5.0*x**2 + 1.414*x + 4.0, x, domain='RR')
HI !, what I understand from the above example is that the domain refers to the 'type' of allowed coefficients that the polynomial can have and if I am not wrong, then why does the first poly have domain have Z and not R (or Q)?
Parnabrita Mondal
@hitblunders
e = 1/sympy.log(x)
e = e.subs(x, sympy.Float("2.71828"))
print('\n')
pprint(e)
pprint(e.evalf())
print()
What is the use of evalf() here? Because the subs() only does the job and returns value that is to be evaluated. Can anybody help me?
Parnabrita Mondal
@hitblunders
e = S(2)**50/S(10)**50
what does this S() do?
Kalevi Suominen
@jksuom
It is an abbreviation of sympify. S(2) will transform the Python integer 2 to SymPy's Integer(2).
>>> type(2)
<class 'int'>
>>> type(S(2))
<class 'sympy.core.numbers.Integer'>
Evan Kohilas
@ekohilas
image.png
Hi all, I' m struggling to find how to support operations like those using sympy
I've looked at functions, n-dim arrays, and tuples
but tuples/ndim arrays don't seem to be the right thing, and I couldn't find documentation on how to extract symbols from functions
Priyanshu
@coderpd:matrix.org
[m]
hey i 'm new here, and while working with tutorial , i got to learn one mistake .. now can someone just help me little. can i discuss that here before making pull request.. .
AmPhIbIaN26
@AmPhIbIaN26
image.png
@hitblunders with subs() you can substitute and return your value, if you see in this example i found on geekforgeeks, you can execute code without evalf(), i think that evalf() is used when you need to evaluate a function and since subs() is just substituting i don't think you need evalf().
AmPhIbIaN26
@AmPhIbIaN26
let me know if this helped
Parnabrita Mondal
@hitblunders
yes, I also think that evalf() is not required to be used here. But found this in examples. That's why asked. Thank you for your kind response.
AmPhIbIaN26
@AmPhIbIaN26
welcome
Mayank Shrivastava
@MayankShrivastava17
Hello developer, I am Mayank Shrivastava, second year student in Computer Science department at KIIT University, India. I am very interested in contributing to Sympy. Is there any guide which can help me.
ARUN.V
@ARUN1321
hi i am arun new to gsoc but good at python coding i really like this organization so i got so many ideas
Aradhana Kund
@aradhana72
Hello I am Aradhana Kund ,second year student in Electronics and Telecommunication Engineering from IIIT Bhubaneswar . I am very efficient in Python Programming Language. I have expertise over Algebra , Calculus ,Statistics, Mathematical algorithms and Numerical Techniques. I have gone through the documentation of sympy and worked on it. I have also tried to contribute to sympy from past two months. I would like to contribute to sympy for GSOC 21. Thank you : Aradhana Kund