[sympy] Outstanding issues for SymPy 1.14

2025-04-14 Thread Oscar Benjamin
Hi all, I am pretty much ready to put out a release candidate for SymPy 1.14 in terms of issues that I am aware of. The release issue is here: https://github.com/sympy/sympy/issues/27939 Open issues/PRs with the 1.14 milestone are here: https://github.com/sympy/sympy/milestone/66 If anyone els

Re: [sympy] symjit

2025-04-13 Thread Oscar Benjamin
On Sun, 13 Apr 2025 at 15:04, Shahriar Iravanian wrote: > > Hi Oscar, > > I wrote a light wrapper around the symjit python backend. It can be installed > using `pip install funcbuilder`. The only dependency is numpy. The GitHub > repo is https://github.com/siravan/funcbuilder. Thanks Shahriar.

Re: [sympy] Releasing SymPy 1.14

2025-04-13 Thread Oscar Benjamin
Thanks Oscar. Sticking with 3.9 for now does seem reasonable. I am inclined to go with that if no one objects. Having just fiddled around with the release notes pages I am reminded that there is a Python version support policy: https://github.com/sympy/sympy/wiki/Python-version-support-policy The

[sympy] Releasing SymPy 1.14

2025-04-13 Thread Oscar Benjamin
Hi all, I think it is a good time to release SymPy 1.14. I was too busy in the last few months to do this. The main thing that needs to be decided before releasing is just what the minimum supported Python version should be. I bumped the minimum version from Python 3.8 to 3.9 because 3.8 is old

Re: [sympy] symjit

2025-04-12 Thread Oscar Benjamin
On Sat, 12 Apr 2025 at 18:01, Shahriar Iravanian wrote: > > Regarding the example, this is a tough test! It is and in some ways it is not realistic but actually in some ways it is. A common case will certainly be small expressions e.g. for simple ODEs as you show in the README. Another case thoug

Re: [sympy] symjit

2025-04-12 Thread Oscar Benjamin
On Sat, 12 Apr 2025 at 16:32, Isuru Fernando wrote: > > SymEngine is a bit slower than protosym due to using memoryviews, but > we can add an interface to avoid those. I'm sure it can be made faster. To be clear to anyone reading this both SymEngine and protosym are using LLVM for this. I could h

Re: [sympy] symjit

2025-04-12 Thread Oscar Benjamin
On Fri, 11 Apr 2025 at 20:49, Shahriar Iravanian wrote: > > The latest version of symjit (1.5.0) has just been published. By now, the > Rust backend is stabilized and generates code on Linus/Darwin/Windows and > x86-64 and arm64 machines. Wow this is amazing. I have been thinking for a long tim

Re: [sympy] Re: GsOC 2025 : Interest in Implementing Power Series Domain in SymPy

2025-04-05 Thread Oscar Benjamin
On Mon, 10 Mar 2025 at 14:51, Jatin Bhardwaj wrote: > > Hello Sympy Developers, > > > I have recently started planning the design and integration of the Power > Series domain and would appreciate some guidance on key structural decisions. > > Currently, my implementation revolves around three pri

Re: [sympy] fyi, Sympy 1.13.3 dsolve test

2025-04-05 Thread Oscar Benjamin
Thanks Nasser. Is there an easy way to access this database of differential equations? It would be useful for SymPy to test against things like this in CI somehow. Oscar On Thu, 13 Mar 2025 at 22:19, 'nma%12...@gtempaccount.com' via sympy wrote: > > fyi: > > This post is also available in plai

[sympy] Private emails about GSOC

2025-04-02 Thread Oscar Benjamin
Hi all, Many people interested in GSOC have emailed me privately or have shared documents with me to review their proposals. I want to be clear that: - I have not replied to anyone in private. - I am not going to reply to any private emails about GSOC. - I am not going to offer feedback on any do

Re: [sympy] Help needed: guidance on group theory

2025-03-30 Thread Oscar Benjamin
I'm not going to read a textbook to review the pull request. Please explain clearly on the pull request what the code does, where the algorithm comes from, why it is correct and whether it is reasonable from a performance perspective. Don't assume that anyone reviewing the pull request understands

Re: [sympy] GSoC'25: Efficient Arithmetic and Factorization for Univariate Polynomials over Algebraic Domains

2025-03-29 Thread Oscar Benjamin
Hi Pratyksh, On Sat, 8 Mar 2025 at 04:50, Pratyksh Gupta wrote: > ... > Current Status - > > SymPy currently has efficient univariate polynomial arithmetic, GCD, and > factorization over modular rings and integers (rationals). However, it lacks > sufficient support for algebraic domains, which

Re: [sympy] Follow-up on PR #27758: Min/Max performance optimization (fixes #16249)

2025-03-29 Thread Oscar Benjamin
Hi Mohamed, You said that there is an unrelated test failure but it is not unrelated. The trasback clearly shows that the code added in the PR is raising the exception and the test passes on master. Oscar On Fri, 14 Mar 2025 at 17:00, MOHAMED LAAREJ wrote: > > Hello everyone, > > I'm Laarej Moh

Re: [sympy] Help needed: guidance on group theory

2025-03-29 Thread Oscar Benjamin
The problem with that PR is that it is for a part of the codebase that is not known well by any of the regular sympy contributors. The code as implemented seems to come from the linked issue but there that code was shown by someone who was asking about it rather than making a clear claim that the c

Re: [sympy] GSoC 2025: Cylindrical algebraic decomposition

2025-03-29 Thread Oscar Benjamin
Hi Alejandro, Yes, we would still like to have CAD. I believe the work on it has stalled probably because mmaaz-git is busy with other things. I think a first step would be to try to finish the PR that did not get merged by taking the commits from there, rebasing them to current master, and then o

[sympy] python-flint 0.7.0 released

2025-03-17 Thread Oscar Benjamin
osta Frédéric Chapoton Oscar Benjamin Tom Hubrecht Changes The full changelog is in the README: https://github.com/flintlib/python-flint?tab=readme-ov-file#070 The documentation is now hosted on readthedocs: https://python-flint.readthedocs.io/en/latest/ There are a lot of

[sage-devel] python-flint 0.7.0 released

2025-03-17 Thread Oscar Benjamin
osta Frédéric Chapoton Oscar Benjamin Tom Hubrecht Changes The full changelog is in the README: https://github.com/flintlib/python-flint?tab=readme-ov-file#070 The documentation is now hosted on readthedocs: https://python-flint.readthedocs.io/en/latest/ There are a lot of

[Numpy-discussion] Re: Add a bit_width function

2025-03-06 Thread Oscar Benjamin via NumPy-Discussion
On Thu, 6 Mar 2025 at 18:12, Carlos Martin wrote: > > Feature request: Add a `bit_width` function to NumPy In Python this is called bit_length: >>> (7).bit_length() 3 ___ NumPy-Discussion mailing list -- numpy-discussion@python.org To unsubscribe sen

Re: [sympy] symjit

2025-02-19 Thread Oscar Benjamin
Hi Shahriar, The symjit package sounds very interesting. I will have to take a look at it. I'm not sure what the list of packages you are referring to is. Presumably a PR to the website can add this? https://github.com/sympy/sympy.github.com Oscar On Wed, 19 Feb 2025 at 22:14, Shahriar Iravani

Re: [sympy] Re: Need GSoC mentors and help updating ideas list

2025-02-17 Thread Oscar Benjamin
t; Can you update the ideas page for this? I think there were also some > ideas that you mentioned to people on the list that should be either > demoted in priority relative to this one, or removed from the ideas > page entirely. > > Aaron Meurer > > On Mon, Feb 17, 2025

Re: [sympy] Re: Need GSoC mentors and help updating ideas list

2025-02-17 Thread Oscar Benjamin
I would be willing to mentor a project around integration of python-flint with SymPy. On Mon, 17 Feb 2025 at 17:17, Aaron Meurer wrote: > > Another idea is instead of working on integrating SymEngine, to work > on integrating Python-Flint, assuming Oscar is willing to mentor such > a project. > >

Re: [sympy] Re: Need GSoC mentors and help updating ideas list

2025-02-16 Thread Oscar Benjamin
I've said this a few times before but I think that we should not roll over the project ideas from year to year at all. We should only advertise ideas that someone right now considers to be high priority and is interested in mentoring and is prepared to write an up to date description of what it is

Re: [sympy] GSOC 2025: Enhancing Multivariate Polynomial Arithmetic and Factorization in SymPy

2025-02-07 Thread Oscar Benjamin
Improving SymPy's multivariate polynomial algorithms does fit with SymPy's development roadmap but the top priority item here is making use of FLINT via python-flint. You can install the latest development version of python-flint from the scientific Python nightly wheels index with: pip install -i

Re: [sympy] [Idea Prompts] Adding More Matrix Decomposition Methods to SymPy for GSOC 2025

2025-02-07 Thread Oscar Benjamin
Hi Temiloluwa, Yes, these kinds of things would be good to have in SymPy. More important than adding many different factorisations though is having good implementations of the most important ones. I would say that just implementing fraction-free and division-based LU algorithms fully would make a

Re: [sympy] Re: Query About Karr's Algorithm Project for GSoC 2025

2025-02-07 Thread Oscar Benjamin
Implementing Karr's algorithm definitely aligns with the SymPy roadmap in the sense that we would want that algorithm to be implemented. It would not be an easy project though and in fact it is likely too big for a single GSOC project. The first steps to get to Karr's algorithm would potentially in

Re: [sympy] Taking a Break

2025-02-07 Thread Oscar Benjamin
Thanks for your amazing contributions Steve. Yes, it is a bit much to be subscribed to the GitHub email firehose especially at times like this. Your input is very valuable so I will CC you when something relevant comes up but obviously everyone understands that it is often not possible to give tim

Re: [sympy] GSOC 2025: Enhancing PDE Support in SymPy (Quasilinear, Nonlinear, and Second-Order PDEs)

2025-02-05 Thread Oscar Benjamin
On Wed, 5 Feb 2025 at 13:41, Jatin Bhardwaj wrote: > > Hello SymPy developers, > > > I am interested in improving SymPy's PDE-solving functionality, particularly > for quasilinear first-order PDEs, general first-order nonlinear PDEs, and > second-order PDEs. Currently, SymPy has strong support f

Re: [sympy] Blog post on NUMFOCUS concerns

2025-01-27 Thread Oscar Benjamin
On Mon, 27 Jan 2025 at 22:21, Aaron Meurer wrote: > > There's also, separately, the question of the quality of LLM generated > code. I think that we need to use the GitHub review process we have > always been using to ensure the SymPy code remains high quality > regardless of its source. This mean

Re: [sympy] Subs and custom expression

2025-01-26 Thread Oscar Benjamin
Hi Paul, This is a bug. I assume that the result is mathematically correct but it is not a good transformation of the expression. Can you open a GitHub issue for this and link back to this mailing list thread (and send the link to the issue back here as well)? The problem is with Pow.conjugate

Re: [sympy] General query regarding code reviews

2025-01-08 Thread Oscar Benjamin
Hi Rushabh, There are no rules about who can review pull requests. If you are reasonably confident that you can offer helpful advice, suggestions or opinions then go ahead. As I am sure you have noticed there are more pull requests in need of review than there are people who have the time to go th

Re: [sympy] Diagonalization Issues

2025-01-07 Thread Oscar Benjamin
You have probably not normalised the vectors correctly. It looks like you have made a matrix in which the rows are the eigenvectors but then normalised the columns. In a symbolic context it is usually a bad idea to normalise the unit vectors. Instead use inverse rather than transpose in the formul

Re: Lengthy numbers

2024-12-22 Thread Oscar Benjamin via Python-list
On Sun, 22 Dec 2024 at 19:17, Gilmeh Serda via Python-list wrote: > > Was just playing with numbers and stumbled on something I've never seen > before. ... > > >>> 9**9**4 > Traceback (most recent call last): > File "", line 1, in > ValueError: Exceeds the limit (4300 digits) for integer string

Re: Division-Bug in decimal and mpmath

2024-12-15 Thread Oscar Benjamin via Python-list
On Sat, 14 Dec 2024 at 19:02, Mark Bourne via Python-list wrote: > > Martin Ruppert wrote: > > Hi, > > > > the division 0.4/7 provides a wrong result. It should give a periodic > > decimal fraction with at most six digits, but it doesn't. > > > > Below is the comparison of the result of decimal, m

Re: [sympy] Seeking Guidance on Contributing: No Progress with 'Easy to Fix' Issues

2024-12-15 Thread Oscar Benjamin
The problem is that the easy to fix issues that are actually easy to fix typically get fixed quite quickly. So the easy to fix label is a label that naturally over time accumulates issues that are *not* easy to fix... What makes the issue easy to fix is basically if it is very clear what the chang

Re: [sympy] Seeking Guidance on Contributing: No Progress with 'Easy to Fix' Issues

2024-12-14 Thread Oscar Benjamin
Often issues are labelled easy to fix but then it turns out that they are not easy to fix but we forget to remove the label. If you see an easy to fix issue that has not been fixed for a long time then comment on the issue to say that it is probably not easy to fix so we can remove the label. On S

Re: [sympy] Real-valued root

2024-12-11 Thread Oscar Benjamin
On Wed, 11 Dec 2024 at 19:15, Paul Royik wrote: > > I try to use the bridge between sympy and numpy, namely, the lambdify > function. > > It looks ok, but there is an issue when I try to calculate the values of > x^(2/5) on the interval [-5,5]. > > Of course, for negative x, the value is nan, be

Re: [sympy] Represent "belongs to"

2024-11-04 Thread Oscar Benjamin
SymPy can represent various sets and you can use Contains e.g.: In [44]: Contains(x, Reals) Out[44]: x ∈ ℝ In [45]: Not(Contains(x, Reals)) Out[45]: ¬x ∈ ℝ In [46]: Contains(x, ImageSet(Lambda(n, 2*n), Integers)) Out[46]: x ∈ {2⋅n │ n ∊ ℤ} Usually it is better though to express the same stateme

Re: [sympy] Smith Form Decomposition

2024-10-17 Thread Oscar Benjamin
On Thu, 15 Aug 2024 at 16:51, Florent Bulkilol wrote: > > Hi, > > I need to perform a Smith decomposition on (a priori not square) matrices to > find a certain change of basis related to the Smith invariants. > > The Smith normal form is already implemented in SymPy in > `sympy.matrices.normalfo

Re: [sympy] LLL assertion errors

2024-10-17 Thread Oscar Benjamin
On Thu, 17 Oct 2024 at 15:59, Robert Dougherty-Bliss wrote: > > Wow, that's great news! I missed the incorporation of flint. > > 1. Is there up-to-date documentation about flint being used in sympy > anywhere? I see your blog post > https://oscarbenjamin.github.io/blog/czi/post2.html > but it woul

Re: [sympy] LLL assertion errors

2024-10-17 Thread Oscar Benjamin
There is some problem with the implementation in SymPy. If you have python-flint installed it works because it uses the FLINT implementation. >>> print(Matrix(v).to_DM().lll().to_Matrix()) Matrix([[-1, 0, 2, 0], [27838432316546329948653649573487634649724968645328, -4921186067158159759802139540236

Re: [sage-devel] Re: On `Ideal.groebner_basis(algorithm='singular:stdfglm')`

2024-10-16 Thread Oscar Benjamin
On Wed, 16 Oct 2024 at 16:45, Nils Bruin wrote: > > On Wednesday 16 October 2024 at 06:43:30 UTC-7 Georgi Guninski wrote: > > sage: Kx.=QQ[] > sage: I=Ideal([x*y]) > sage: gb=I.groebner_basis(algorithm='singular:stdfglm') > > TypeError: Singular error: > ? The ideal i has to be 0-dimensional > > I

Re: [sage-devel] Re: [debian-science] Modularized sagemath packages: proof of concept

2024-10-09 Thread Oscar Benjamin
On Wed, 9 Oct 2024 at 18:15, Marc Culler wrote: > > On Wednesday, October 9, 2024 at 9:32:27 AM UTC-6 Gonzalo Tornaría wrote: > > > As far as I know, cysignals is another instance of a component originally > > developed for sagemath, about maybe 20 years ago, then separated into a > > standalone

Re: [sage-devel] Re: [debian-science] Modularized sagemath packages: proof of concept

2024-10-08 Thread Oscar Benjamin
> > On Tuesday 8 October 2024 at 13:20:54 UTC-7 marc@gmail.com wrote: > > On Tuesday, October 8, 2024 at 1:23:55 PM UTC-6 Nils Bruin wrote: > > > Pypi packages have a default size limit of 100MB per file and 10GB per > > project. > > As you're pointing out, sage still fits within 10GB in sourc

Re: [sympy] Using C in SymPy to improve speed?

2024-10-08 Thread Oscar Benjamin
If you pip install python-flint then it will be used to make some things in SymPy faster. Compare e.g. this with python-flint installed vs not installed: In [2]: %time p = Poly(x + 1)**1000 CPU times: user 202 ms, sys: 88 μs, total: 202 ms Wall time: 200 ms In [3]: %time r = p.factor_list() CPU t

Re: [sage-devel] Re: [debian-science] Modularized sagemath packages: proof of concept

2024-10-07 Thread Oscar Benjamin
On Mon, 7 Oct 2024 at 20:19, Dima Pasechnik wrote: > > Mind you, Mathematica (!) bundles Flint (which is GPL, and depends on > GPLd libraries). FLINT is LGPL as are its dependencies GMP and MPFR. I'm no expert on license terms but Wikipedia says: The main difference between the GPL and the LGPL

Re: [sage-devel] Re: [debian-science] Modularized sagemath packages: proof of concept

2024-10-07 Thread Oscar Benjamin
On Mon, 7 Oct 2024 at 06:05, Kwankyu Lee wrote: > > On Monday, October 7, 2024 at 12:24:04 AM UTC+9 marc@gmail.com wrote: > > > I would say that the motivation is to make it possible for a developer to > > include a self-contained portion of sage in a separate project without > > having to m

Re: [sage-devel] Re: [debian-science] Modularized sagemath packages: proof of concept

2024-10-02 Thread Oscar Benjamin
On Wed, 2 Oct 2024 at 18:16, Matthias Koeppe wrote: > On Tuesday, October 1, 2024 at 10:54:36 PM UTC-7 axio...@yahoo.de wrote: >> >> What do you have in mind people would do with just the stuff in >> `categories`? > > As the dependency diagram shows -- it works as the common dependency of > va

Re: [sage-devel] Re: [debian-science] Modularized sagemath packages: proof of concept

2024-09-28 Thread Oscar Benjamin
On Sun, 29 Sept 2024 at 00:22, Matthias Koeppe wrote: > > On Saturday, September 28, 2024 at 12:28:30 PM UTC-7 axio...@yahoo.de wrote: > > I could also imagine to have three layers: > > * a core distribution with absolutely minimal dependencies and only > dependencies which have proved stable on

Re: [sage-support] Re: Error installing package scipy-1.12.0 in Develop

2024-09-13 Thread Oscar Benjamin
On Thu, 12 Sept 2024 at 14:25, Dima Pasechnik wrote: > > Sage merely invokes pip to build scipy from source. > > Indeed, apart from ninja paralellism there is meson parallelism, > which is controlled by JOBS env. variable (?). > Note that JOBS should be just a number. I think meson just delegates

Re: [sage-support] Re: Error installing package scipy-1.12.0 in Develop

2024-09-12 Thread Oscar Benjamin
On Thu, 12 Sept 2024 at 09:31, Dima Pasechnik wrote: > > scipy itself is not built with configure/make, it's built with meson, ... > There is no direct way to specify a non-default "-j" value, however it > appears to be possible to do this via meson, > which invokes ninja via "meson compile". Ho

Re: [sage-devel] Re: QQbar(-1)^(1/3) != AA(-1)^(1/3)

2024-09-04 Thread Oscar Benjamin
On Wed, 4 Sept 2024 at 11:06, Kwankyu Lee wrote: > > On Wednesday, September 4, 2024 at 1:41:30 PM UTC+9 Nils Bruin wrote: > > ... it may well depend on whether you're more algebraically or analytically > oriented. > > > Yes. That may be a way to reconcile the conflicting views. > > We may explic

Re: [sage-devel] Re: QQbar(-1)^(1/3) != AA(-1)^(1/3)

2024-09-03 Thread Oscar Benjamin
On Tue, 3 Sept 2024 at 09:09, Dima Pasechnik wrote: > > Would it be better to hold a vote to decide on the ways to deal with this > issue, rather than on this particular PR? > Namely, the alternatives are > > 1) do nothing > 2) bring AA in line with Python > 3) bring RR in line with AA What does

Re: [sympy] AlphaGeometry and future of symbolic computation

2024-08-23 Thread Oscar Benjamin
On Fri, 23 Aug 2024 at 23:29, Sangyub Lee wrote: > > To be more productive, SymPy itself can enhance its geometry capabilities by > incorporating Wu's method or a deductive database approach, > which are useful in addressing geometric challenges. > I’ve also shared the implementation of the Area

Re: [sympy] Problem with `series`

2024-08-22 Thread Oscar Benjamin
The general approach for computing series in SymPy is algorithmically misdesigned. See: https://github.com/sympy/sympy/issues/26957 On Thu, 22 Aug 2024 at 13:26, emanuel.c...@gmail.com wrote: > > The series method of a (large) expressin doesn’t return : > > from sympy import * x1, x2, x3, x4, w1

Re: [sympy] Re: AlphaGeometry and future of symbolic computation

2024-08-19 Thread Oscar Benjamin
It is a lot easier to use a computer algebra system than lean but the goals are different. I was thinking about the idea of making an AI that could talk to a theorem prover like lean. The idea would be that you have an AI that hallucinates lots of proofs that may or may not be correct but then you

Re: [sympy] Re: Smith Form Decomposition

2024-08-16 Thread Oscar Benjamin
It would be good to have this in SymPy but unfortunately it is not implemented yet. It is also not available in python-flint or Flint either. On Fri, 16 Aug 2024 at 15:38, Chris Smith wrote: > > As far as I can tell, these matrices are not computed implicitly. You would > have to copy the appro

Re: [sage-devel] Removing the backend for mpmath provided by Sage

2024-07-27 Thread Oscar Benjamin
I find it quite difficult to understand the Sage code so I can't really review the PR. I will say though that I think that this is an important change to make. Both SymPy and Sage reach deeply into mpmath's internals which means that mpmath itself is hamstrung when it comes to future improvements.

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

2024-07-27 Thread Oscar Benjamin
For a simple case like assuming that b > -1 you can use a change of variables: bp1 = Symbol('(b+1)', positive=True) expr = expr.subs(b, bp1-1) -- Oscar On Sat, 27 Jul 2024 at 17:08, Pierre H wrote: > > Actually, thinking a bit more, I can get away with the assumption that x is > an integer (in

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, simp

Re: [sympy] Sets documentation: Logic vs Topology

2024-07-27 Thread Oscar Benjamin
Hi Robert, I'm not sure practically what it would mean to allow for custom topologies. If it only affects things like is_closed, boundary etc then there could be a function added to use different topologies like closure(some_set, some_topology). Besides the usual topology on the reals, which topo

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(5.9894

[sympy] Re: SymPy 1.13.0 released

2024-07-19 Thread Oscar Benjamin
r On Mon, 8 Jul 2024 at 22:42, Oscar Benjamin wrote: > > 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 r

Re: [pytest-dev] pytest-failed: dump/restore failed tests

2024-07-16 Thread Oscar Benjamin
On Tue, 16 Jul 2024 at 10:09, Florian Schulze wrote: > > On 16 Jul 2024, at 1:36, Oscar Benjamin wrote: > > > I like this idea. I would want it to have behaviour that > > --lf=failed.txt checks if the file exists and if not populates it with > > the contents from the p

Re: [pytest-dev] pytest-failed: dump/restore failed tests

2024-07-15 Thread Oscar Benjamin
This is a nice feature that I would definitely use. On Mon, 15 Jul 2024 at 16:04, Bruno Oliveira wrote: > > On Mon, Jul 15, 2024, at 9:53 AM, Florian Schulze wrote: > > > > What if the --lf option can optionally accept a file name, which when > > given, will read the set of failed tests from tha

Re: Relatively prime integers in NumPy

2024-07-11 Thread Oscar Benjamin via Python-list
(posting on-list this time) On Thu, 11 Jul 2024 at 15:18, Popov, Dmitry Yu via Python-list wrote: > > Dear Sirs. > > Does NumPy provide a simple mechanism to identify relatively prime integers, > i.e. integers which don't have a common factor other than +1 or -1? For > example, in case of this

Re: [sage-devel] Any tips for Maxima migrating to GitHub

2024-07-11 Thread Oscar Benjamin
ub > Enterprise server (you can install it for free and use for a month or > so - you'd need a Linux server to run it on). > > HTH, > Dima > > > > > On Thu, Jul 11, 2024 at 5:50 PM Oscar Benjamin > wrote: > > > > Hi all, > > > >

[sage-devel] Any tips for Maxima migrating to GitHub

2024-07-11 Thread Oscar Benjamin
Hi all, There have been some discussions and tentative attempts to migrate Maxima from SourceForge to GitHub e.g.: https://sourceforge.net/p/maxima/mailman/message/58794267/ I'm wondering how Sage managed to migrate issues from trac to GitHub while still preserving things like who is the author o

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

2024-07-09 Thread Oscar Benjamin
Ideally series would produce something more like a Poly object rather than just an Add with an O() term. You can use Poly to get the coefficients in order: In [6]: sin(x).series(x,0,10).removeO().as_poly(x).coeffs()[::-1] Out[6]: [1, -1/6, 1/120, -1/5040, 1/362880] In [7]: sin(x).series(x,0,10).r

[sympy] SymPy 1.13.0 released

2024-07-08 Thread Oscar Benjamin
e. Thanks to everyone who contributed to this release! - Daan Koning (he/him)* - Anton Akhmerov - Han Wei Ang* - anutosh491 - Isidora Araya* - atharvParlikar* - Oscar Benjamin - Evandro Bernardes - Anurag Bhat - Francesco Bonazzi - Augusto Borges* - João Bravo* - Sam Brockie - Pontus von Brömssen -

Re: Best use of "open" context manager

2024-07-06 Thread Oscar Benjamin via Python-list
On Sat, 6 Jul 2024 at 11:55, Rob Cliffe via Python-list wrote: > > Consider this scenario (which I ran into in real life): > I want to open a text file and do a lot of processing on the lines > of that file. > If the file does not exist I want to take appropriate action, e.g. > print an

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 Th

Re: [sympy] SymPy 1.13.0rc1 released

2024-07-02 Thread Oscar Benjamin
On Tue, 2 Jul 2024 at 17:29, Aaron Meurer wrote: > > On Tue, Jul 2, 2024 at 5:09 AM Oscar Benjamin > wrote: > > > > On Mon, 1 Jul 2024 at 18:04, Aaron Meurer wrote: > > > > > > On Mon, Jul 1, 2024 at 4:38 AM Oscar Benjamin > > >

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
On Mon, 1 Jul 2024 at 18:04, Aaron Meurer wrote: > > On Mon, Jul 1, 2024 at 4:38 AM Oscar Benjamin > wrote: > > > > I think my preference is: > > > > 1. Use python-flint >= 0.6.0, < 1.0 automatically. > > 2. Don't use python-flint < 0.5.0 or &

Re: [sympy] SymPy 1.13.0rc1 released

2024-07-01 Thread Oscar Benjamin
; consider them to be equivalent. It also fixes a long standing issue > where Floats and Rationals would compare equal but not hash to the > same values. > > This is a change that I expect could affect upstream projects, so if > you depend on SymPy I would suggest trying 1.13rc1 out a

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

2024-06-21 Thread Oscar Benjamin
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 favour of going with SPEC 0 in coordination with >> > the rest of the scientifi

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Oscar Benjamin via Python-list
On Wed, 12 Jun 2024 at 23:52, Greg Ewing via Python-list wrote: > On 13/06/24 10:09 am, Chris Angelico wrote: > > So if anyone > > actually does need to use pip with Python 2.7, they probably need to > > set up a local server > > You should also be able to download a .tar.gz from PyPI and use p

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Oscar Benjamin via Python-list
On Wed, 12 Jun 2024 at 23:11, Chris Angelico via Python-list wrote: > > On Thu, 13 Jun 2024 at 07:57, Oscar Benjamin via Python-list > wrote: > > They are seeing a warning that explicitly says "You can upgrade to a > > newer version of Python to solve this"

Re: Couldn't install numpy on Python 2.7

2024-06-12 Thread Oscar Benjamin via Python-list
On Wed, 12 Jun 2024 at 22:38, AVI GROSS via Python-list wrote: > > The discussion though was about a specific OP asking if they can fix their > problem. One solution being suggested is to fix a deeper problem and simply > make their code work with a recent version of python 3. The OP has not repl

[sympy] SymPy 1.13.0rc1 released

2024-06-06 Thread Oscar Benjamin
their names contributed a patch for the first time for this release; 100 people contributed for the first time for this release. Thanks to everyone who contributed to this release! - Daan Koning (he/him)* - Anton Akhmerov - Han Wei Ang* - anutosh491 - Isidora Araya* - atharvParlikar* - Oscar Ben

Re: [sage-devel] Re: Python version support for SymPy/Sage

2024-06-05 Thread Oscar Benjamin
Thanks Matthias. On Wed, 5 Jun 2024 at 19:32, Matthias Koeppe wrote: > On Wednesday, June 5, 2024 at 5:31:30 AM UTC-7 Oscar Benjamin wrote: > > > Ordinarily SymPy would have dropped support for Python 3.8 by now > > anyway regardless of SPEC 0 or NEP 29. I can't

Re: [sympy] Addin sympy to SPEC 0?

2024-06-05 Thread Oscar Benjamin
On Tue, 4 Jun 2024 at 21:10, Oscar Benjamin wrote: > > Personally I am in favour of going with SPEC 0 in coordination with > the rest of the scientific Python ecosystem. I don't want to cause any > immediate problems for Sage though so I would be reluctant to make a > last min

[sage-devel] Python version support for SymPy/Sage

2024-06-05 Thread Oscar Benjamin
Hi all, My question here is: would it be problematic for Sage if SymPy were to follow SPEC 0/NEP 29 which would mean dropping support for older Python versions more quickly? We are about to release SymPy 1.13 which will support Python 3.8 to 3.13. It has been asked on the SymPy mailing list wheth

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 after a > > feature release to fix s

[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. The iss

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 I run from sympy import find_poly_si

Re: [sympy] Re: Real-Root Isolation

2024-05-21 Thread Oscar Benjamin
On Wed, 22 May 2024 at 00:23, Ani J wrote: > > The polynomial 4x^2 - 9 has rational roots, whereas the output of the print > statement is: [((-2, -1), 1), ((1, 2), 1)] > All intervals here are of length more than 0. > It would be great if in general it is possible that the endpoints of > differe

Re: [sympy] Re: Real-Root Isolation

2024-05-21 Thread Oscar Benjamin
On Tue, 21 May 2024 at 22:02, Aaron Meurer wrote: > > IMO, we should just fix the function to not return intersecting > endpoints in the first place. The intervals aren't really isolating if > they intersect. For rational roots the intervals are of length 0. For irrational roots the root lies in

Re: [sympy] Re: Apply factor to subexpressions

2024-05-21 Thread Oscar Benjamin
You can pass factor as the third argument to collect like collect(rhs, ρ, factor). Then the collected coefficients will be factored. On Tue, 21 May 2024 at 21:27, Don Burgess wrote: > > Thank you very much for your helpful reply. > > Since I was using collect, I used the following code: > > ```py

[Numpy-discussion] Re: Please consider dropping Python 3.9 support for Numpy 2.0

2024-05-06 Thread Oscar Benjamin
On Mon, 6 May 2024 at 19:59, Aaron Meurer wrote: > > On Mon, May 6, 2024 at 6:34 AM Mark Harfouche > wrote: > > > > I'm asking that you let Python 3.9 support disappear with 1.26, and not > > "drop a final version" before you decide to move on with 3.10+ only. > > I don't understand NumPy suppo

Re: [sage-devel] wasm

2024-04-30 Thread Oscar Benjamin
> > Since I am not a programmer and nobody in my team is a mathematician (so my > > developers don't know Sage), I kindly ask on this list for any hints how we > > could proceed? > Sage mainly uses other open source C libraries to carry out these > factorizations, so you would need to be able t

Re: [sage-devel] wasm

2024-04-30 Thread Oscar Benjamin
Hi Doris, I believe some parts of Sage can be used in WASM (via pyodide) but others cannot so I am not sure if it is possible to get the functionality that you want from Sage in WASM. It is however possible to use SymPy in WASM (via pyodide) as demonstrated here using JupyterLite: https://live.sy

Re: [sympy] SymPy Wedge Product Question

2024-04-28 Thread Oscar Benjamin
I don't know enough about this topic bur there is also galgebra which is a library that depends on SymPy: https://galgebra.readthedocs.io/en/latest/tutorials/algebra.html Does that do what is needed? On Sun, 28 Apr 2024 at 09:37, 'Carsten' via sympy wrote: > > HI, > > I almost do not follow this

Re: [sage-devel] Re: Urgent and important: Please vote on disputed PR #36964 (next step of the modularization project)

2024-04-24 Thread Oscar Benjamin
On Wed, 24 Apr 2024 at 15:37, Marc Culler wrote: > > I think that CyPari ;and CyPari2 provide a relevant example. > > Some background ... CyPari is a PyPi package with binary wheels which > predates and was the starting point for Sage's cypari2 (hence the 2 in the > name). The basis for CyPari

Re: [sage-devel] Re: Urgent and important: Please vote on disputed PR #36964 (next step of the modularization project)

2024-04-24 Thread Oscar Benjamin
On Tue, 23 Apr 2024 at 15:27, Marc Culler wrote: > > The projects that will really benefit from modularization will be those that > provide their own limited mathematical context. Developers of such projects > will be able to choose which parts of Sage are relevant to their specific > context.

[Numpy-discussion] Re: numpy 2.0.x has been branched.

2024-03-25 Thread Oscar Benjamin
On Sat, 9 Mar 2024 at 10:16, Ralf Gommers wrote: > > On Sat, Mar 9, 2024 at 2:03 AM Oscar Benjamin > wrote: >> >> On Sat, 9 Mar 2024 at 00:44, Charles R Harris >> wrote: >> > >> > About a month from now. >> >> What will happen about a

Re: [sympy] SymPy, Flint, and sparse polynomial representations

2024-03-12 Thread Oscar Benjamin
Hi Jake, I would be happy to meet (online) with you and your supervisor at some point if that helps. Oscar On Tue, 12 Mar 2024 at 11:49, Jake Moss wrote: > > Thank you for such a detailed reply! Seems like there will be plenty for me > to do. > > I'll reach out to David Einstein on GitHub late

Re: [sympy] In memory of Kalevi Suominen

2024-03-11 Thread Oscar Benjamin
t; His contributions to SymPy will live on. I believe he mentored GSoC students. > If anyone knows more about Kalevi and can share, that would be much > appreciated. > > Sincerely, > > Jason > moorepants.info > +01 530-601-9791 > > > On Sun, Mar 10, 2024 at 5:31 PM

Re: [sympy] SymPy, Flint, and sparse polynomial representations

2024-03-11 Thread Oscar Benjamin
On Mon, 11 Mar 2024 at 13:06, Jake Moss wrote: > > Hi, Hi Jake, > I'm looking at SymPy and Flint, and their sparse polynomial representations > under the direction of my supervisor for an Honours thesis at the University > of Queensland, Australia and I was wondering about the status of the ex

[sympy] In memory of Kalevi Suominen

2024-03-10 Thread Oscar Benjamin
Hi all SymPy community, It is with great sadness that I bring the news that Kalevi Suominen (@jksuom on GitHub) passed away on the 4th of March. Kalevi's son Risto passed on this news to me and some others by email yesterday. I never met Kalevi in person but we had many conversations online over

  1   2   3   4   5   6   7   8   9   10   >