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)

aplund
@aplund:matrix.org
[m]
I'm pretty sure I have no idea what I'm talking aboout.
aplund
@aplund:matrix.org
[m]
should you be able to use generators? Tuple((simplify(x) for x in y)) ?
Aaron Meurer
@asmeurer
Tuple(*[simplify(x) for x in y])
There are no in-place operations in SymPy. All objects are immutable.
Sayandip Halder
@sayandip18
@mircodezorzi The == checks LHS and RHS for equality. I think what you meant is this
>>> solve(z-y**2+4*x+6,x**2+y**2-9, z)
[(x**2 + y**2 - 9, -4*x + y**2 - 6)]
aplund
@aplund:matrix.org
[m]
should this not simplify to 1:
a,b=symbols('a,b',is_positive=True)
simplify((a2-b2)/abs(a2-b2),assuming=a>b)
actually even a/abs(a) doesn't
or maybe the positive bit isn't working
laolux
@laolux:wolkendienst.dynv6.net
[m]
a/abs(a) works if you declare a=symbols('a', positive=True)
there is some difference between positive=True and is_positive=True
you can check by looking at a.assumptions0
aplund
@aplund:matrix.org
[m]
Is it possible to make a matrix with entries from a finite field?
I tried assigning FiniteField instances into a matrix, but they just get recalled as integers.
volokh0x
@volokh0x
Hello, I'm another beginner here and would want to help.
First-time involvement in open source is, probably, a good chance to ask the first a bit silly question, so mine is:
How strong should be someone's math background for contributing to this library? Is there any room for entry-level skills students?
Thanks
2 replies
Parnabrita Mondal
@hitblunders
hello, can anyone explain me what is happening here?
from sympy import *
from sympy.abc import x
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.