Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Aug 14 11:01

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Removed simplify call for sign(… (compare)

  • Aug 14 02:48

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Added tests for all asymptotic… (compare)

  • Aug 14 01:27

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Refactored limits for dealing w… (compare)

  • Aug 13 06:02

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Fixed errors arising for limits… (compare)

  • Aug 12 03:51

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    added bottom_up simplification … (compare)

  • Aug 12 03:05

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    added testing for changes adde… (compare)

  • Aug 12 02:57

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    removed condition from leading … (compare)

  • Aug 09 10:29

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    minor changes (compare)

  • Aug 09 05:13

    anutosh491 on GSoC_Pr4.1_Implementing_few_series_methods_for_bessel_functions

    Fixed failing test (compare)

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

ThePauliPrinciple
@ThePauliPrinciple

class custom_latex(sy.printing.latex):
def _print_Idx(self,expr):
return self._print(expr.label)

complains "init() takes 3 positional arguments but 4 were given" I feel like I'm writing some typo I don't realise?

Oscar Gustafsson
@oscargus
@anutosh491 I think your are correct. I have not set up document building on my Windows laptop...
@ThePauliPrinciple latex is just a wrapper for the class LatexPrinter.print() if I recall correctly.
So you should subclass LatexPrinter instead and possibly provide a similar command.
ThePauliPrinciple
@ThePauliPrinciple
Ah I see
ThePauliPrinciple
@ThePauliPrinciple
Yeah, got it to work!

class CustomLatexPrinter(LatexPrinter):
def _print_Idx(self,expr):
return self._print(expr.label)

@sym.printing.printer.print_function(CustomLatexPrinter)
def custom_latex(expr,**settings):
return CustomLatexPrinter(settings).doprint(expr)

ThePauliPrinciple
@ThePauliPrinciple
Thanks a lot :)
ThePauliPrinciple
@ThePauliPrinciple
from sympy import IndexedBase,symbols,Idx,Derivative
X = IndexedBase('X')
D = IndexedBase('D')
i= symbols('i', cls=Idx)
Derivative(X[i]*X[i],D[i])
Is there some way to tell sympy that X is a function of D?
pillsy
@pillsy
Is there a way to match (not just replace) a pattern where the argument is fixed and the function is wild?
In Mathematica, I'd match a pattern like f_[x]
pillsy
@pillsy
Variations on this don't work:
sympify('f(x)').match(Function(Wild('g'))(Symbol('x')))
(Stripping the commutative assumption off of the Wild symbol doesn't do the trick....)
pillsy
@pillsy
OK, I can do something like this:
F_x = Wild('F', properties=[lambda e: e.args == (x,)])
Swagat S. Bhuyan
@SwagatSBhuyan
Hello, I'm Swagat from india. Looking forward to contributing to Python. If anyone would be kind enough to guide me in these initial stages of getting the hang of it and starting to contribute, that would be really great. Thanks!
Tirthankar Mazumder
@wermos
I too am looking to contribute to SymPy!
Sidharth Mundhra
@0sidharth
https://github.com/sympy/sympy/wiki/Introduction-to-contributing has some pointers to help get you started
Anutosh Bhat
@anutosh491
Hello ,I am trying to approach couple of issues involving Sum.doit() but I am not able to understand completely how doit works for a Sum/Integral ( sometimes the recursive call and other times the not so self-explanatory variables like 'rep','did' etc (yeah i know its not possible to write self-explanatory variables always) in the code throw me off and finding it a bit tough to relate as a whole .
any guidance by someone familiar with doit/concrete module regarding how does doit calculate a basic sum like an infinite geometric series would be great ! Thanks
ThePauliPrinciple
@ThePauliPrinciple
Just wanted to point out that I wrote some ideas/examples in https://github.com/sympy/sympy/discussions/22219 looking forward to any feedback
ThePauliPrinciple
@ThePauliPrinciple
Thanks for the reply @oscarbenjamin !
falematte
@falematte
image.png
I think that I found a bug on the evaluation of the limits of a function that I summarize in this pic. Any tips? I can also provide the code to reproduce it.
Of course L and r are symbols positive defined
falematte
@falematte
I have opened and Issue here, please contribute sympy/sympy#22220
The limit is different in the discontinuity points.
ThePauliPrinciple
@ThePauliPrinciple
I am looking to setup a workflow to work on a pull request. In particular, I am looking for some way to be able to edit the library and then immediately check manually/interactively if I obtained the intended result. For example, to have a conda environment which uses the fork as the source for sympy. Any ideas? I have read through the development workflow document, but I feel I'm missing the point on how to do this effectively.
anonbox.netuser
@anonbox.netuser:matrix.org
[m]
Hi, is sympy 1.9 officially released? I saw it is tagged on github, but the usual files for downloading are missing and pypi also only lists 1.9cr1 as latest version. The sympy.org website is also not helpful in this regard, showing the release of 1.7.1 as latest news.
Anutosh Bhat
@anutosh491
Hi guys , I was solving an issue regarding functions/limits and I came across something which might help . So do we have any method /function in sympy that checks whether some function/expression might encapsulate or bound another expression . Like is there any way I could check something like -1/x < cos(x)/x < 1/x or even one sided
ThanhVu (Vu) Nguyen
@nguyenthanhvuh
Hi, it seems that the .subs function is quite slow. When I have a long expression e (can contain nonlinear terms like x**2, y*x*z), calling e.subs(some_dict) takes quite sometime (a sec or so). In fact subs is often slower than solving for large equations. Am I using subs correctly?
빈백에 박제가 되어버린 로듐을 아시오?
@45Rh_science_twitter
image.png
hi guys i'm new with sympy, so can anyone help me with solving this problem?
I was trying it on my own, but i can't get a grip on how to solve this Error
image.png
import sympy as sp
from sympy import exp, oo

sp.init_printing()

x = sp.Symbol("x")
a, m, h = sp.symbols("a, m, h", positive = True)
A = sp.Symbol("A")

f = exp(-2 * a * m * x**2 / h)
int_f = sp.integrate(f, (x, 0, oo))

eq1 = 2 * (abs(A))**2 * (int_f) - 1

print(sp.solve(eq1, A))
ThePauliPrinciple
@ThePauliPrinciple
A = sp.Symbol("A",real=True) seems to give a solution (although I have not verified it is the correct solution)
빈백에 박제가 되어버린 로듐을 아시오?
@45Rh_science_twitter
I'll give it a try thanks!
wow it works thank u!!!!
Henry smith
@Henrysm41987301_twitter
Hello all. Henry here , I'm using sympy for the first time for one of my course project reports at my University. The course is based on series and summations overall and while trying to get familiar I realized that Sum((-1)**(x+1) + (-1)**(x+2) , (x, 1, oo)).is_convergent() is not returning the expected result and raises a TypeError saying Invalid NaN comparison , is this a meaningful error or Am I missing something useful ?Maybe I could raise an issue ?
anonbox.netuser
@anonbox.netuser:matrix.org
[m]
Try: sym.simplify(sym.Sum((-1)**(x+1)+(-1)**(x+2),(x,1,sym.oo)))
So basically try to simplify the expression, may yield some more insight also in other cases.
Anutosh Bhat
@anutosh491
@Henrysm41987301_twitter hey Thanks for pointing this out . No need to raise an issue ,there is a fix for similar errors in sympy/sympy#22200 which is currently being reviewed by @oscargus and others .Maybe after that is fixed you could use this expression!
Henry smith
@Henrysm41987301_twitter
Thanks for the suggestions
ThePauliPrinciple
@ThePauliPrinciple
tests finished: 9644 passed, 436 skipped, 355 expected to fail, 4 expected to fail but passed, in 2343.62 seconds <- this means there is nothing wrong correct?
1 reply
ThePauliPrinciple
@ThePauliPrinciple
What is the logic in sympy for when to import at the top of a module or inside the code?
Kalevi Suominen
@jksuom
@ThePauliPrinciple Imports should preferably be at the top of a module but sometimes they lead to circular imports and then those must be put in a function or method in order to delay the import.
ThePauliPrinciple
@ThePauliPrinciple
That makes sense, thanks!
ThePauliPrinciple
@ThePauliPrinciple
Ah, I had no choice in the first place, I was doing a circular import anyways