Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 05:13

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Fixed failing test (compare)

  • 01:30

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Fixed code quality failure (compare)

  • Aug 05 12:45

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    included exp forms for bessel f… (compare)

  • Aug 05 12:05

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Minor change (compare)

  • Aug 05 11:59

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Refactored mrv_leadterm in grun… (compare)

  • Aug 01 03:22

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Added e.is_negative case for be… (compare)

  • Aug 01 02:43

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    hanled e.is_negative case for b… (compare)

  • Aug 01 02:03

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Replacing exp rewrite with trig… (compare)

  • Jul 31 11:41

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Minor changes (compare)

  • Jul 31 11:30

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    added support when exponent of … (compare)

  • Jul 31 11:00

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Fixed leading term method for b… (compare)

  • Jul 28 04:15

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Added tests for 7224 (compare)

  • Jul 28 03:19

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Added tests for series of besse… (compare)

  • Jul 28 02:51

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Added series test for besseli f… (compare)

  • Jul 28 02:38

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Added tests for leading term me… (compare)

  • Jul 28 02:25

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Added nseries method for bessel… (compare)

  • Jul 27 18:26

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Fixed failing tests (compare)

  • Jul 27 14:49

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Added and fixed some tests (compare)

  • Jul 27 14:20

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    implemented leading term and ns… (compare)

  • Jul 27 14:16

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    fixed series for bessely (compare)

Aaron Meurer
@asmeurer
I mean look at the sympy source code.
Paul Moore
@pfmoore
I'm playing with sympy as a possible way of doing some (relatively basic) probability calculations, using the sympy.Stats module. Doing something like X, Y = Die('X', 6), Die('Y', 6); density(X+Y) is neat, but if I wanted to get the distribution of the highest of the 2 rolls, how would I do that? density(max(X,Y)) doesn't work - I can see why, but I don't know where to look in the docs for something equivalent that would work. What's the best way for me to learn how to model calculations like this?
3 replies
Kuldeep Borkar Jr
@KuldeepBorkar
Hello developers,
I am Kuldeep Borkar from Maharashtra
in 1st year of B.tech Artificial Intelligence,
I was just looking for a great opportunity to make a great contribution to this organization and I found GSOC. It would be great help if I am guided for making contributions and yes join community to work on a project. I am comfortable with Python and C programming. I just now want to start making contributions to this organization, resolve issues and wish to collaborate with community.
Francesco
@cescofran_gitlab
@pfmoore have you tried with density(Max(X, Y))? Where Max is the sympy max operation vs max the python operation?
Paul Moore
@pfmoore
@cescofran_gitlab Ah, no, I hadn't spotted that there's a sympy max. (There's so much in sympy, it's hard to know you've missed something like that :-)) I'll give that a try, thanks.
Aaron Meurer
@asmeurer
If you have any suggestions on how we could improve the discoverability of such things in our documentation, let us know.
We are hoping to apply to Google Season of Docs this year with a project to improve the organization of our documentation.
2 replies
aplund
@aplund:matrix.org
[m]
If I have a Tuple() object, can I do .simplify() to simplify the elements in inplace?
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)))