Re: [sympy] Simplification of a^x * (1/a)^x: not equal to 1?

2024-07-27 Thread Oscar Benjamin
assumption >> mechanism" doc https://docs.sympy.org/latest/guides/assumptions.html and it >> seems that the assumption I need (b>-1) cannot be implemented. Indeed the >> doc says "At the time of writing (SymPy 1.7)", but I guess it's still valid >> in 2

Re: [sympy] Simplification of a^x * (1/a)^x: not equal to 1?

2024-07-27 Thread Pierre H
ssumption > mechanism" doc https://docs.sympy.org/latest/guides/assumptions.html and > it seems that the assumption I need (b>-1) cannot be implemented. Indeed > the doc says "At the time of writing (SymPy 1.7)", but I guess it's still > valid in 2024, correct

Re: [sympy] Simplification of a^x * (1/a)^x: not equal to 1?

2024-07-27 Thread Pierre H
org/latest/guides/assumptions.html and it seems that the assumption I need (b>-1) cannot be implemented. Indeed the doc says "At the time of writing (SymPy 1.7)", but I guess it's still valid in 2024, correct? Pierre Le samedi 27 juillet 2024 à 16:12:34 UTC+2, Oscar a écr

Re: [sympy] Simplification of a^x * (1/a)^x: not equal to 1?

2024-07-27 Thread Oscar Benjamin
It is a classic question about SymPy. By default SymPy assumes that all symbols represent arbitrary complex numbers. For the most part only simplifications that are compatible with any complex numbers will be applied either automatically or by explicit simplification functions such as powsimp

RE: [sympy] Simplification of a^x * (1/a)^x: not equal to 1?

2024-07-27 Thread peter.stahlecker
If you declare a to be positive, it simplifies with me. From: sympy@googlegroups.com On Behalf Of Pierre H Sent: Saturday, July 27, 2024 2:38 PM To: sympy Subject: [sympy] Simplification of a^x * (1/a)^x: not equal to 1? Hello, This is perhaps a classical question, but since I'm only

[sympy] Simplification of a^x * (1/a)^x: not equal to 1?

2024-07-27 Thread Pierre H
Hello, This is perhaps a classical question, but since I'm only using SymPy every now and then... I wonder why the expression a^x * (1/a)^x doesn't simplify to 1. See code (with SymPy 1.12) a,x = symbols('a x') simplify(a**x * (1/a)**x) (then of course the variant a**x * (1/(a**x)) does

Re: [sympy] Sets documentation: Logic vs Topology

2024-07-27 Thread Oscar Benjamin
topologies would be computationally useful? Oscar On Sat, 27 Jul 2024 at 10:20, Robert Simione wrote: > > Hello all, > I was reading the Sympy documentation on Sets which is under the Logic > section of the documentation, but a LOT the properties discussed like > boundaries and cl

[sympy] Sets documentation: Logic vs Topology

2024-07-27 Thread Robert Simione
Hello all, I was reading the Sympy documentation on Sets <https://docs.sympy.org/latest/modules/sets.html> which is under the Logic section of the documentation, but a LOT the properties discussed like boundaries and closures are only definable when there is a topology defined. It's

Re: [sympy] How sympy runs the benchmarks so fast?

2024-07-25 Thread Aaron Meurer
It looks like they aren't run on the run that runs on every pull request https://github.com/sympy/sympy/blob/958cc95aebc35ced70d870586e68d0468684c1a0/asv.conf.actions.json#L67 There are some separate asv.conf.slow.json configurations in the benchmarks repo for people who want to run the slow

Re: [sympy] How sympy runs the benchmarks so fast?

2024-07-25 Thread Asish Kumar
I was recently checking https://github.com/sympy/sympy_benchmarks and had some questions: 1. Are slow_benchmarks are also run by asv? 2. If yes, why it's in a seperate folder? 3. If No, why it's there? On Tuesday, July 16, 2024 at 12:00:44 AM UTC+5:30 asme...@gmail.com wrote: > Look

Re: [sympy] Re: SWE-agent paper uses SymPy

2024-07-24 Thread Aaron Meurer
Just so we are clear, I am opposed to using AI to automatically open pull requests in this way, and I would ask that people please don't do this in the SymPy repository. I think that AI tools can be useful to help find and fix bugs, and if that can be streamlined more, for instance, by making

[sympy] Re: SWE-agent paper uses SymPy

2024-07-24 Thread Sangyub Lee
I notice a PR created today that is suspected to be generated by LLM (sorry if it is false accusation) Title: Fix is_zero Attribute Handling in Expression SimplificationDes… by Devansh-46 · Pull Request #26850 · sympy/sympy (github.com) <https://github.com/sympy/sympy/pull/26850> H

Re: [sympy] Re: a R in front of the result

2024-07-22 Thread Aaron Meurer
; Dear Peter > I can provide this example:¨ > > >>> from sympy import * > >>> from sympy.abc import x, a, b, R, w, U, t, p > >>> print(solve(R*a/x**2 + b*w**2*R + I*(R*b*w - R*a/x) - a**2*U*exp(I*(p > [{R: U*a**2*x**2*exp(I*p)/(-I*a*x + a + b*w**2*x*

Re: [sympy] Re: a R in front of the result

2024-07-22 Thread waltermeier_44
Dear Peter I can provide this example:¨ >>> from sympy import * >>> from sympy.abc import x, a, b, R, w, U, t, p >>> print(solve(R*a/x**2 + b*w**2*R + I*(R*b*w - R*a/x) - a**2*U*exp(I*(p [{R: U*a**2*x**2*exp(I*p)/(-I*a*x + a + b*w**2*x**2 + I*b*w*x**2)}] >&g

[sympy] Announcing Algebra_with_Sympy release 1.1.0, including more sophisticated assignment of integers as exact...

2024-07-22 Thread 'gu...@uwosh.edu' via sympy
I am pleased to announce Algebra_with_Sympy release 1.1.0. This is recommended for all users. The key changes are: - Setting integers as exact (set_integers_as_exact(), the default) now only sets integers as exact within Sympy and Algebra_with_Sympy expressions. This increases

[sympy] Re: a "R" in front of the result

2024-07-22 Thread Peter Stahlecker
s message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/bc6647

[sympy] a "R" in front of the result

2024-07-22 Thread Walter Meier
What means an "R" in front of a "result* , which is not really a result, because it contains still the variable x ??? -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emai

Re: [sympy] Wrong answer

2024-07-21 Thread Oscar Benjamin
Thanks. This is a bug so best to open a GitHub issue: https://github.com/sympy/sympy/issues If you use rational numbers rather than floats it gives the correct answer: In [9]: print(dsolve(nsimplify(ode), y)) Eq(y(x), (C1 + C2*x)*exp(-x/2)) In [10]: print(dsolve(ode, y)) Eq(y(x), (C1*sin

[sympy] Wrong answer

2024-07-21 Thread Tony K B
got wrong answer for this ODE y''+y'+0.25y=0, Out put attached. Correct answer is (c_1+c_2*x)e^{-0.5x}. thank you -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, sen

[sympy] Re: SymPy 1.13.0 released

2024-07-19 Thread Oscar Benjamin
Hi all, I've just pushed SymPy 1.13.1 to PyPI. This has a few bugfixes for regressions reported in 1.13.0. The release notes are here: https://github.com/sympy/sympy/wiki/Release-Notes-for-1.13.1 If using pip then you can upgrade with pip install -U sympy. The conda package will I assume

Re: [sympy] How sympy runs the benchmarks so fast?

2024-07-15 Thread Aaron Meurer
to be recompiled every time in order to install it into the virtual environment, that could be a factor (SymPy is pure Python, so installation time is not an issue). If this is an issue you might consider caching nightly wheels for recent commits somewhere. Aaron Meurer On Mon, Jul 15, 2024 at 1:14

[sympy] How sympy runs the benchmarks so fast?

2024-07-15 Thread Asish Kumar
it). I was wondering how sympy does it? I checked the benchmark actions of sympy and was pretty surprised to see that it only takes 20 mins to run the whole benchmark. Thank you Asish Kumar -- You received this message because you are subscribed to the Google Groups "sympy" group. To

[sympy] Re: Getting started with contribution

2024-07-14 Thread Shishir Kushwaha
I suggest contributing guide <https://docs.sympy.org/dev/contributing/index.html> , setup the repository locally and start learning a bit about sympy and look at its issues on github. Thanks, Shishir Kushwaha On Tuesday 9 July 2024 at 09:29:20 UTC+5:30 f202...@hyderabad.bits-pilani

Re: [sympy] Re: Is this a bug?

2024-07-09 Thread Oscar Benjamin
).removeO().as_poly(x).all_coeffs()[::-1] Out[7]: [0, 1, 0, -1/6, 0, 1/120, 0, -1/5040, 0, 1/362880] -- Oscar On Tue, 9 Jul 2024 at 10:41, emanuel.c...@gmail.com wrote: > > Doesn't matter : > > ``` > >>> from sympy import * > >>> x=symbols("x") > &g

[sympy] Re: Is this a bug?

2024-07-09 Thread Chengpu Wang
How do I detect which order of x? On Tuesday, July 9, 2024 at 5:41:50 AM UTC-4 emanuel.c...@gmail.com wrote: > Doesn't matter : > > ``` > >>> from sympy import * > >>> x=symbols("x") > >>> sin(x).series(x,0,10).args &g

[sympy] Re: Is this a bug?

2024-07-09 Thread emanuel.c...@gmail.com
Doesn't matter : ``` >>> from sympy import * >>> x=symbols("x") >>> sin(x).series(x,0,10).args (x, -x**3/6, -x**7/5040, x**5/120, x**9/362880, O(x**10)) ``` The arguments tuple doesn't order `x` powers (and this isn't a problem, since (complex) multiplicati

[sympy] Is this a bug?

2024-07-08 Thread Chengpu Wang
Hi, I am a new user of SymPy. I wonder if the following result is a bug? Anyway, the following code is a nuance. I am using the latest SymPy class TestSymPy (unittest.TestCase): def testSin(self): ''' The expansion is not ordered by x**n: x**7 before x**5

[sympy] Getting started with contribution

2024-07-08 Thread ATHARVA CHAPHEKAR
or policies of BITS Pilani. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To view this discussion on the web vi

[sympy] SymPy 1.13.0 released

2024-07-08 Thread Oscar Benjamin
Hi all, I've just pushed the final release of SymPy 1.13.0 to PyPI: https://pypi.org/project/sympy/ You can upgrade to 1.13.0 by running: pip install -U sympy I expect that the release will be available in conda soon as well. The release files are also available from GitHub: https

[sympy] TU Delft student report on Implementing the Method of Macaulay in Python

2024-07-07 Thread Mark van Gelder
Dear all, The last 2 months I have been busy researching the Method of Macaulay and implementing this method in the beam module of SymPy. I am a Civil Engineering student at the TU Delft and did this project as my bachelor thesis. The report can be found here: https://repository.tudelft.nl

Re: [sympy] Announcing Algebra_with_SymPy release V1.0.2...

2024-07-05 Thread 'gu...@uwosh.edu' via sympy
Announcing bugfix release v.1.0.2 for Algebra with Sympy <https://gutow.github.io/Algebra_with_Sympy/algebra_with_sympy.html>. This one solves some display issue problems specific to Google Colab. If you use Colab you should update. On Wednesday, January 3, 2024 at 12:57:20 PM UTC-

Re: [sympy] Solving systems of polynomials in SymPy

2024-07-03 Thread Oscar Benjamin
Hi Maaz, This sounds like an excellent addition to SymPy. There was also a recent GitHub issue that discussed a more limited form of CAD: https://github.com/sympy/sympy/issues/26177 The implementations there are based on this paper by Strzebonski: https://core.ac.uk/download/pdf/82649664.pdf

Re: [sympy] Solving systems of polynomials in SymPy

2024-07-03 Thread Aaron Meurer
On Tue, Jul 2, 2024 at 4:22 PM Maaz Muhammad wrote: > Hi all! I'm a PhD student at the University of Toronto, working on > polynomials (optimization, algorithms, and applications). > > As part of my work, I needed to solve systems of polynomials (inequalities > and equalitie

[sympy] Solving systems of polynomials in SymPy

2024-07-02 Thread Maaz Muhammad
Hi all! I'm a PhD student at the University of Toronto, working on polynomials (optimization, algorithms, and applications). As part of my work, I needed to solve systems of polynomials (inequalities and equalities), which SymPy currently lacks. I have therefore been working on such a solver

Re: [sympy] SymPy 1.13.0rc1 released

2024-07-02 Thread Oscar Benjamin
3. Unless the SYMPY_GROUND_TYPES=flint variable is set in which case > > > > use python-flint regardless of the version. > > > > 4. Keep future versions of python-flint compatible with SymPy 1.13 > > > > until python-flint 1.0. > > > > 5. Once Sym

Re: [sympy] SymPy 1.13.0rc1 released

2024-07-02 Thread Aaron Meurer
thon-flint >= 0.6.0, < 1.0 automatically. > > > 2. Don't use python-flint < 0.5.0 or >= 1.0 and don't give any warning > > > about it. > > > 3. Unless the SYMPY_GROUND_TYPES=flint variable is set in which case > > > use python-flint regardless of the ve

Re: [sympy] SymPy 1.13.0rc1 released

2024-07-02 Thread Oscar Benjamin
On Tue, 2 Jul 2024 at 12:09, Oscar Benjamin wrote: > > If sympy uses python-flint 0.n to say 0.n+3 then python-flint can test > older versions of sympy for as long as they are "supported" and sympy > can just not use newer versions. Then we can say that sympy now > accep

Re: [sympy] SymPy 1.13.0rc1 released

2024-07-02 Thread Oscar Benjamin
1.0 and don't give any warning > > about it. > > 3. Unless the SYMPY_GROUND_TYPES=flint variable is set in which case > > use python-flint regardless of the version. > > 4. Keep future versions of python-flint compatible with SymPy 1.13 > > until python-flint 1.0. &g

Re: [sympy] SymPy 1.13.0rc1 released

2024-07-01 Thread Aaron Meurer
On Mon, Jul 1, 2024 at 4:38 AM Oscar Benjamin wrote: > > Hi all, > > Some issues were reported with the SymPy 1.13.0rc1 release candidate. > Since then I pushed 1.13.0rc2 and 1.13.0rc3 and I'm about to push > 1.13.0rc4. Thanks to everyone who tested the release candidate

Re: [sympy] SymPy 1.13.0rc1 released

2024-07-01 Thread Oscar Benjamin
Hi all, Some issues were reported with the SymPy 1.13.0rc1 release candidate. Since then I pushed 1.13.0rc2 and 1.13.0rc3 and I'm about to push 1.13.0rc4. Thanks to everyone who tested the release candidate and reported any problems. I think this is a list of issues and PRs that have been

[sympy] Re: In memory of Kalevi Suominen

2024-06-28 Thread Oscar
ity of Helsinki, so it goes without saying that I share your > sadness and all the positive thoughts about him I find on the SymPy pages. > > > Kalevi became a member of the Finnish Academy of Science and Letters at > the tender age of 33 years, and therefore the Academy will publish a

[sympy] Re: In memory of Kalevi Suominen

2024-06-28 Thread Kaj Malm
about him I find on the SymPy pages. Kalevi became a member of the Finnish Academy of Science and Letters at the tender age of 33 years, and therefore the Academy will publish an obituary in due time, both in Finnish and in English. Most likely we have to wait for that until next year

Re: TRe: [sympy] Addin sympy to SPEC 0?

2024-06-21 Thread Jason Moore
Oscar > > On Wed, 19 Jun 2024 at 13:35, Anton Akhmerov > wrote: > > > > Thank you Oscar for taking action. Does that mean that sympy can endorse > spec-0? Or that will it do so starting from some version? > > > > Anton > > > > On Wednesday 5 June 2024

Re: TRe: [sympy] Addin sympy to SPEC 0?

2024-06-21 Thread Oscar Benjamin
Hi Anton, I was hoping that others might express their opinions about this. SPEC 0 seems fine to me. Oscar On Wed, 19 Jun 2024 at 13:35, Anton Akhmerov wrote: > > Thank you Oscar for taking action. Does that mean that sympy can endorse > spec-0? Or that will it do so starting

TRe: [sympy] Addin sympy to SPEC 0?

2024-06-19 Thread Anton Akhmerov
Thank you Oscar for taking action. Does that mean that sympy can endorse spec-0? Or that will it do so starting from some version? Anton On Wednesday 5 June 2024 at 21:13:21 UTC+2 Oscar wrote: > On Tue, 4 Jun 2024 at 21:10, Oscar Benjamin wrote: > > > > Personally I am in

Re: [sympy] Re: Manipulation of integrals using set operations on the integration domains

2024-06-11 Thread Aaron Meurer
: return S.Zero return Expr.__new__(cls, m, n, l) Note that you need to manually handle making sure inputs and outputs are SymPy types. I would suggest looking at the source code for Integral.__new__ and ExprWithLimits.__new__. Aaron Meurer On Tue, Jun 11, 2024 at 6:01 AM Michael Gfrerer wrote

Re: [sympy] Re: Manipulation of integrals using set operations on the integration domains

2024-06-11 Thread Michael Gfrerer
the followiung code without success: import sympy as sp class LebesgueIntegral(sp.Expr): def _latex(self, printer, exp=1): m, n, l = self.args _m, _n, _l = printer._print(m), printer._print(n), printer._print(l) return r'\int_{%s} %s \,d%s' % (_m, _n, _l) @classmethod

Re: [sympy] SymPy 1.13.0rc1 released

2024-06-08 Thread Aaron Meurer
>> Rational(1, 2) == Float(0.5) False This was previously applied inconsistently. For example, it always worked this way inside of expressions >>> x**2 == x**2.0 False The motivation for this change is that == means structural, not mathematical equality in SymPy, and ratio

Re: [sympy] Re: Manipulation of integrals using set operations on the integration domains

2024-06-06 Thread Aaron Meurer
assumptions about the input. Of course, to actually compute things, it might need to convert the integral into a usual multidimensional signed Integral, since that is what SymPy knows how to work with. Although SymPy's ability to operate on multidimensional integrals is fairly limited and there might

[sympy] SymPy 1.13.0rc1 released

2024-06-06 Thread Oscar Benjamin
Hi all, I have just pushed SymPy 1.13.0rc1 to PyPI. This is a prerelease that is being made available for early testing. You can install this with: pip install sympy==1.13.0rc1 Or alternatively: pip install --upgrade --pre sympy The release files can also be downloaded from GitHub

Re: [sympy] Re: Manipulation of integrals using set operations on the integration domains

2024-06-06 Thread Sangyub Lee
is unordered, however, we lose the identity Integral(f(x), (x, a, b)) == -Integral(f(x), (x, b, a)) which had holded before On Wednesday, June 5, 2024 at 9:20:51 PM UTC+2 asme...@gmail.com wrote: > Not presently. There are objects representing sets in SymPy, but there > isn't an

Re: [sympy] Re: Manipulation of integrals using set operations on the integration domains

2024-06-05 Thread Aaron Meurer
Not presently. There are objects representing sets in SymPy, but there isn't anything to represent an integral over a set. The current Integral class is hard-coded to support indefinite integrals or standard definite integrals over signed intervals. You could make your own version of such a thing

Re: [sympy] Addin sympy to SPEC 0?

2024-06-05 Thread Oscar Benjamin
ecision to drop two Python versions right now for 1.13. I followed this up on the Sage mailing list: https://groups.google.com/g/sage-devel/c/0BPkiiWYrIU/m/9c2asTEaEwAJ?utm_medium=email_source=footer That suggests that Sage has no need for SymPy 1.13 to support Python 3.8 which would have been dr

[sympy] Re: Manipulation of integrals using set operations on the integration domains

2024-06-05 Thread Michael Gfrerer
ooks like: > > > I can "typeset" the left-hand-side by: > > from sympy import * > x = Symbol('x') > u = Function('u')(x) > lhs = integrate(u, (x, 'Omega',)) + integrate(u, (x, Symbol(r'D \setminus > \Omega'),)) > > Obviously, it is not possible to s

[sympy] Manipulation of integrals using set operations on the integration domains

2024-06-04 Thread Michael Gfrerer
I would be interested in doing symbolic manipulation of integrals involving unevaluated functions and symbolic integration domains. A simplified problem looks like: I can "typeset" the left-hand-side by: from sympy import * x = Symbol('x') u = Function('u')(x) lhs = integrate(u,

Re: [sympy] Releasing SymPy 1.13

2024-06-04 Thread Aaron Meurer
On Tue, Jun 4, 2024 at 1:49 PM Oscar Benjamin wrote: > > Hi all, > > A couple of weeks ago I put out a release for SymPy 1.12.1 which was > just a few minor changes from 1.12 for compatibility with CPython > 3.12, recent unreleased changes in mpmath and also changes in the &g

Re: [sympy] Addin sympy to SPEC 0?

2024-06-04 Thread Oscar Benjamin
On Sun, 14 Apr 2024 at 14:15, Anton Akhmerov wrote: > > > SymPy does not really support old versions with maintenance releases > > so it does not really have a "support cycle" in the sense that SPEC 0 > > seems to describe. There can be a bugfix release shortly aft

[sympy] Releasing SymPy 1.13

2024-06-04 Thread Oscar Benjamin
Hi all, A couple of weeks ago I put out a release for SymPy 1.12.1 which was just a few minor changes from 1.12 for compatibility with CPython 3.12, recent unreleased changes in mpmath and also changes in the upcoming NumPy 2.0. After some delay I have initiated the release of SymPy 1.13

[sympy] Re: Add operation

2024-05-30 Thread Sangyub Lee
I think that this question is quite technical, but I may take a chance to answer this I think that you may try to fix this by adding constructor_postprocessor_mapping to corresponding vector module, as done by matrix https://github.com/sympy/sympy/blob/8c94201570737a2fc3ef8e9cc53bed01a44e8281

[sympy] Re: New member

2024-05-29 Thread 'gu...@uwosh.edu' via sympy
Debapriya, Welcome. I suggest you start with the links below. Go to https://github.com/sympy/sympy/wiki/introduction-to-contributing and read about contributing to the project. Then look at the Easy to Fix and Good First Issues in the Github repository: https://github.com/sympy/sympy/issues

[sympy] New member

2024-05-28 Thread Debapriya Kumar
Hello, I am Debapriya . I am new to this community and new to Open source. Can anyone help me out in finding good first issues to get started with. -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop

Re: [sympy] Unable to solve the following set of equations

2024-05-28 Thread Aaron Meurer
exists, you'll have to do some work yourself manipulating the equations yourself to help SymPy find it, because it doesn't yet have the algorithms to find it on its own. If you find that a closed-form solution does exist, you can open an issue for SymPy to improve its solvers for this equation. Aaron

Re: [sympy] Unable to solve the following set of equations

2024-05-28 Thread Chris Smith
gt; > arc_length_expr = integrate(sqrt(1 + (2 * a * x + b)**2), >> > (x, x1, x2)) >> > eq3 = Eq(arc_length_expr, length) >> > solution = solve((eq1, eq2, eq3), (a, b, c)) >> > >> > # Print the solution to debug >> > print("Solution:", solut

Re: [sympy] Unable to solve the following set of equations

2024-05-25 Thread Shishir Kushwaha
(sqrt(1 + (2 * a * x + b)**2), > > (x, x1, x2)) > > eq3 = Eq(arc_length_expr, length) > > solution = solve((eq1, eq2, eq3), (a, b, c)) > > > > # Print the solution to debug > > print("Solution:", solution) > > > > return solution > > >

Re: [sympy] Unable to solve the following set of equations

2024-05-25 Thread Aaron Meurer
, c)) > > # Print the solution to debug > print("Solution:", solution) > > return solution > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails

[sympy] Unable to solve the following set of equations

2024-05-25 Thread Shishir Kushwaha
to debug print("Solution:", solution) return solution -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To

Re: [sympy] Re: Apply factor to subexpressions

2024-05-23 Thread Don Burgess
> Thank you very much for your helpful reply. > > > > Since I was using collect, I used the following code: > > > > ```python > > import sympy as sp > > from sympy import sin, cos, atan, integrate, diff > > t,μ,ρ,ψ = sp.symbols(['t','μ','ρ','ψ']) > > &g

Re: [sympy] Re: Real-Root Isolation

2024-05-22 Thread Chris Smith
gt; > > > Thank you for the quick response. > > > > Yes, it looks like refine_root() does the job more efficiently. Thank > you for the note. > > > > I am facing issues in getting _find_poly_sign_univariate function to > work. > > When I run

[sympy] Add operation

2024-05-22 Thread 'Henrique Miguel Cortes Soares' via sympy
"sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/736e4f2b-3690-4b2b-bac0-29a757fecf1bn%40googlegroups.com.

Re: [sympy] Re: Real-Root Isolation

2024-05-21 Thread Oscar Benjamin
On Wed, 22 May 2024 at 01:10, Ani J wrote: > > Thank you for the quick response. > > Yes, it looks like refine_root() does the job more efficiently. Thank you for > the note. > > I am facing issues in getting _find_poly_sign_univariate function to work. > When

Re: [sympy] Re: Real-Root Isolation

2024-05-21 Thread Ani J
Thank you for the quick response. Yes, it looks like refine_root() does the job more efficiently. Thank you for the note. I am facing issues in getting _find_poly_sign_univariate function to work. When I run from sympy import find_poly_sign, I get the following error: ImportError: cannot

Re: [sympy] Re: Real-Root Isolation

2024-05-21 Thread Oscar Benjamin
he tool itself gives separate intervals. See the function _find_poly_sign_univariate in https://github.com/sympy/sympy/issues/26177 That function finds points where a univariate polynomial is nonzero that separate all roots. -- Oscar -- You received this message because you are subscribed to the Goog

Re: [sympy] Re: Real-Root Isolation

2024-05-21 Thread Aaron Meurer
have your intervals to just refine a single interval, which would at least be a little more efficient. Aaron Meurer On Tue, May 21, 2024 at 4:30 PM Ani J wrote: > > It doesn't look like just taking the minimum length works. > Consider the following program: > > from sympy imp

Re: [sympy] Re: Real-Root Isolation

2024-05-21 Thread Ani J
ot intersect because the interval does not contain its boundary. For rational roots the intervals may not be of length 0. Consider the following program: - from sympy import Poly - from sympy.abc import x - from sympy import div, ZZ, QQ, RR - print(Poly(4*x**2 - 9, x, domain='QQ

Re: [sympy] Re: Real-Root Isolation

2024-05-21 Thread Oscar Benjamin
car -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.go

Re: [sympy] Re: Real-Root Isolation

2024-05-21 Thread Ani J
It doesn't look like just taking the minimum length works. Consider the following program: - from sympy import Poly - from sympy.abc import x - from sympy import div, ZZ, QQ, RR - p = Poly(x**6 + 19/5*x**5 + 131/50*x**4 - x**2 - 19/5*x - 131/50, x, domain='QQ') - print

Re: [sympy] Re: Real-Root Isolation

2024-05-21 Thread Aaron Meurer
r >> >> On Tue, May 21, 2024 at 2:51 PM Ani J wrote: >> > >> > >> > Oh! I see, but i believe that the intervals overlap on the endpoints, is >> > it possible to make the intervals completely disjoint?? >> > For example consider the following program: >

Re: [sympy] Re: Real-Root Isolation

2024-05-21 Thread Ani J
> > On Tue, May 21, 2024 at 2:51 PM Ani J wrote: > > > > > > Oh! I see, but i believe that the intervals overlap on the endpoints, is > it possible to make the intervals completely disjoint?? > > For example consider the following program: > > > > from

Re: [sympy] Re: Real-Root Isolation

2024-05-21 Thread Aaron Meurer
, 1), ((-1, -1), 1), ((-10/11, -9/10), 1), ((1, 1), 1)] Aaron Meurer On Tue, May 21, 2024 at 2:51 PM Ani J wrote: > > > Oh! I see, but i believe that the intervals overlap on the endpoints, is it > possible to make the intervals completely disjoint?? > For example consider the followi

Re: [sympy] Re: Real-Root Isolation

2024-05-21 Thread Ani J
Oh! I see, but i believe that the intervals overlap on the endpoints, is it possible to make the intervals completely disjoint?? For example consider the following program: - from sympy import Poly - from sympy.abc import x - from sympy import div, QQ - p = Poly(x**6 + 19/5*x**5

Re: [sympy] Re: Apply factor to subexpressions

2024-05-21 Thread Oscar Benjamin
llowing code: > > ```python > import sympy as sp > from sympy import sin, cos, atan, integrate, diff > t,μ,ρ,ψ = sp.symbols(['t','μ','ρ','ψ']) > > rhs = 2*μ*(1 - ρ*cos(ψ)**2)*ρ*sin(ψ)**2 > > from sympy.simplify.fu import TR8 > rhs = TR8(rhs).expand() > > rhs = sp.

[sympy] Re: Apply factor to subexpressions

2024-05-21 Thread Don Burgess
Thank you very much for your helpful reply. Since I was using collect, I used the following code: ```python import sympy as sp from sympy import sin, cos, atan, integrate, diff t,μ,ρ,ψ = sp.symbols(['t','μ','ρ','ψ']) rhs = 2*μ*(1 - ρ*cos(ψ)**2)*ρ*sin(ψ)**2 from sympy.simplify.fu import TR8 rhs

Re: [sympy] Re: Real-Root Isolation

2024-05-21 Thread Aaron Meurer
t an interval in which there is > more than one root, it will raise an error. > > /c > On Tuesday, May 21, 2024 at 6:06:14 AM UTC-5 ani...@gmail.com wrote: >> >> Is it possible to use SymPy library to get intervals (with rational >> endpoints) such that there is exact

[sympy] Re: Apply factor to subexpressions

2024-05-21 Thread Chris Smith
This is what your code looks like after prefixing with ‘’’python and suffixing with ‘’’ (where back tics were used instead of single quotes): def factor_subexpressions(expr): """Factors all subexpressions of a SymPy expression. Args: expr: A SymPy expression. Returns: A S

[sympy] Re: Apply factor to subexpressions

2024-05-21 Thread Chris Smith
debur...@gmail.com wrote: > > Is this function a good way to apply factor to subexpressions? > > def factor_subexpressions(expr): > """Factors all subexpressions of a SymPy expression. > > Args: > expr: A SymPy expression. > > Returns: >

[sympy] Re: Real-Root Isolation

2024-05-21 Thread Chris Smith
21, 2024 at 6:06:14 AM UTC-5 ani...@gmail.com wrote: > Is it possible to use SymPy library to get intervals (with rational > endpoints) such that there is exactly one root in the interval? I would > like to use an implementation of RRI algorithm for my purpose. I believe > that

[sympy] Real-Root Isolation

2024-05-21 Thread Ani J
Is it possible to use SymPy library to get intervals (with rational endpoints) such that there is exactly one root in the interval? I would like to use an implementation of RRI algorithm for my purpose. I believe that the interval function does this. Is this correct? Is it guaranteed

[sympy] Apply factor to subexpressions

2024-05-21 Thread Don Burgess
Is this function a good way to apply factor to subexpressions? def factor_subexpressions(expr): """Factors all subexpressions of a SymPy expression. Args: expr: A SymPy expression. Returns: A SymPy expression with all subexpressions factored. """

[sympy] SWE-agent paper uses SymPy

2024-05-18 Thread Aaron Meurer
The SWE-agent project uses LLMs to try to automatically fix issues in GitHub repositories. I found their paper interesting, mostly because they make extensive use of SymPy as a test repository. https://swe-agent.com/ Apparently there are quite a few SymPy issues in the SWE-bench dataset, which

Re: [sympy] New feature possibility

2024-05-15 Thread Aaron Meurer
uot;Misc" section in the page mentioned > on my first message? > > > That page hasn't really been updated since 2014 :( > Time units are already supported. Calendars are not. I cannot think of a use > case where users would use SymPy for calendars. I agree. We don't want S

Re: [sympy] New feature possibility

2024-05-15 Thread Francesco Bonazzi
en updated since 2014 :( Time units are already supported. Calendars are not. I cannot think of a use case where users would use SymPy for calendars. Or is there anything from the units module you would like us to work on? It would be nice to have transformations between unit systems. But that's

Re: [sympy] New feature possibility

2024-05-14 Thread Aaron Meurer
Francesco could probably give a more specific answer, but I imagine you could find some things that need fixing in the units module if you search in the issue tracker. Aaron Meurer On Mon, May 13, 2024 at 8:56 AM 'Henrique Miguel Cortes Soares' via sympy wrote: > > Sorry for the late re

Re: [sympy] New feature possibility

2024-05-13 Thread 'Henrique Miguel Cortes Soares' via sympy
Sorry for the late response, we've been busy with other subjects. What about time systems, included in the "Misc" section in the page mentioned on my first message? Or is there anything from the units module you would like us to work on? We could also work on some new area where symp

RE: [sympy] GSoC 2024 Contributors Announced

2024-05-06 Thread peter.stahlecker
Clear, thank you Aaron! -Original Message- From: sympy@googlegroups.com On Behalf Of Aaron Meurer Sent: Montag, 6. Mai 2024 21:08 To: sympy@googlegroups.com Subject: Re: [sympy] GSoC 2024 Contributors Announced Yes, I probably should have shared this initially, but you can see a list

Re: [sympy] GSoC 2024 Contributors Announced

2024-05-06 Thread Aaron Meurer
Yes, I probably should have shared this initially, but you can see a list of the projects with their summaries at https://summerofcode.withgoogle.com/programs/2024/organizations/sympy Aaron Meurer On Fri, May 3, 2024 at 12:25 PM wrote: > > Dear Aaron, > > I am happy to join in co

Re: [sympy] Re: Enhancing the flexibility of MatchPy

2024-05-06 Thread Samith Kavishke
need to have a fork of this repository in >> somewhere (Sympy org or else). So If someone can help me with that I will >> try to contribute. >> >> Best Regards, >> Samith Karunathilake. >> >> On Friday, May 3, 2024 at 2:54:28 AM UTC+5:30 asme...@gmail

Re: [sympy] Re: Enhancing the flexibility of MatchPy

2024-05-05 Thread Francesco Bonazzi
Hi Aaron, > Thank you for the reply, I would like to give it try. In-order to > contribute to this project, I need to have a fork of this repository in > somewhere (Sympy org or else). So If someone can help me with that I will > try to contribute. > > Best Regards, &

Re: [sympy] Re: Enhancing the flexibility of MatchPy

2024-05-03 Thread Samith Kavishke
Hi Aaron, Thank you for the reply, I would like to give it try. In-order to contribute to this project, I need to have a fork of this repository in somewhere (Sympy org or else). So If someone can help me with that I will try to contribute. Best Regards, Samith Karunathilake. On Friday, May 3

Re: [sympy] GSoC 2024 Contributors Announced

2024-05-03 Thread Shishir Kushwaha
orces and Torques: Jason Moore, Timo > Stienstra > Riccardo Di Girolamo, Sympy for Classical Mechanics: Developing and > Benchmarking Equations of Motion Generation Methods: Jason Moore, Timo > Stienstra > > Is there a way, I can 'see' what will be done there? > > Thanks &

RE: [sympy] GSoC 2024 Contributors Announced

2024-05-03 Thread peter.stahlecker
messholds true. These two projects look interesting to me: Hwayeon Kang, Implementing Specific Forces and Torques: Jason Moore, Timo Stienstra Riccardo Di Girolamo, Sympy for Classical Mechanics: Developing and Benchmarking Equations of Motion Generation Methods: Jason Moore, Timo Stienstra

  1   2   3   4   5   6   7   8   9   10   >