Another important change in this release is that Rational (and
Integer) and Float objects no longer compare equal to one another with
==.

Previously:

>>> Integer(1) == Float(1.0)
True
>>> Rational(1, 2) == Float(0.5)
True

Now:

>>> Integer(1) == Float(1.0)
False
>>> 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 rational and floating-point
numbers have different properties that make it inappropriate to
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 and letting us
know if it affects you in a serious way.

Aaron Meurer

On Thu, Jun 6, 2024 at 9:08 AM Oscar Benjamin
<oscar.j.benja...@gmail.com> wrote:
>
> 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:
>
>   https://github.com/sympy/sympy/releases/tag/1.13.0rc1
>
> I expect that a full release of 1.13.0 will be made fairly soon and I
> don't anticipate that there would be significant changes between rc1
> and final release.
>
> There are many changes since the previous release 1.12 which was just
> over a year ago. you can find the release notes here although they
> still need cleaning up:
>
>   https://github.com/sympy/sympy/wiki/Release-Notes-for-1.13
>
> One particular highlight of this release is that it can use
> python-flint to accelerate some polynomial and other operations. It
> would be great if people could test this out by installing
> python-flint as well:
>
>   pip install python-flint==0.6
>
> You can set the environment variable SYMPY_GROUND_TYPES to any of
> python, gmpy2 or flint to control which backend is used. The most
> easily noticeable difference python-flint makes for now is speeding up
> operations with univariate polynomials:
>
>   $ SYMPY_GROUND_TYPES=python isympy
>   ...
>   IPython console for SymPy 1.13.0rc1 (Python 3.12.0-64-bit) (ground
> types: python)
>   ...
>   In [1]: p = Poly(x + 1)
>
>   In [2]: %time factor_list(p ** 100)
>   CPU times: user 117 ms, sys: 183 µs, total: 117 ms
>   Wall time: 115 ms
>   Out[2]: (1, [(Poly(x + 1, x, domain='ZZ'), 100)])
>
>   $ SYMPY_GROUND_TYPES=flint isympy
>   ...
>   IPython console for SymPy 1.13.0rc1 (Python 3.12.0-64-bit) (ground
> types: flint)
>    ...
>   In [1]: p = Poly(x + 1)
>
>   In [2]: %time factor_list(p ** 100)
>   CPU times: user 4.05 ms, sys: 16 µs, total: 4.07 ms
>   Wall time: 4.01 ms
>   Out[2]: (1, [(Poly(x + 1, x, domain='ZZ'), 100)])
>
> That particular example shows a 30x speedup. Future releases of SymPy
> will use flint for more operations so this is still in development but
> it would be great for people to test this because although I have
> tested SymPy with python-flint a lot I am not sure how many other
> people have.
>
> As always please report any problems with the release either here or
> on Github. There are so many changes in this release that it is
> basically guaranteed that there will be some issues discovered
> afterwards but it would be great if we could pick up on some of them
> before the final release rather than after.
>
> ## Authors
>
> The following people contributed at least one patch to this release (names are
> given in alphabetical order by last name). A total of 146 people
> contributed to this release. People with a * by 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 Benjamin
> - Evandro Bernardes
> - Anurag Bhat
> - Francesco Bonazzi
> - Augusto Borges*
> - João Bravo*
> - Sam Brockie
> - Pontus von Brömssen
> - Steven Burns*
> - Liwei Cai*
> - Corey Cerovsek*
> - HeeJae Chang*
> - Abhishek Chaudhary*
> - Abhinav Cillanki*
> - codecruisader*
> - Costor
> - Björn Dahlgren
> - Saikat Das*
> - Ethan DeGuire*
> - Theodore Dias*
> - dodo*
> - fazledyn-or*
> - Emile Fourcini*
> - Mark van Gelder*
> - Riccardo Di Girolamo*
> - Pascal Gitz*
> - Aaron Gokaslan
> - Kishore Gopalakrishnan
> - Michael Greminger
> - Oscar Gustafsson
> - Nick Harder*
> - Zac Hatfield-Dodds*
> - Le Cong Minh Hieu*
> - Warren Jacinto*
> - Jerry James
> - Hwayeon Kang*
> - Samith Karunathilake*
> - Harsh Kasat*
> - Johannes Kasimir*
> - Kaustubh*
> - Steve Kieffer
> - Evelyn King
> - Matthias Köppe
> - K. Kraus*
> - Abhishek kumar*
> - Abhishek Kumar*
> - Shishir Kushwaha*
> - S.Y. Lee
> - Raphael Lehner*
> - Matthias Liesenfeld*
> - Qijia Liu
> - Sam Lubelsky
> - Fabio Luporini*
> - Megan Ly
> - Nikhil Maan
> - Colin B. Macdonald
> - Oriel Malihi*
> - Mohak Malviya*
> - Martin Manns*
> - Tirthankar Mazumder
> - Ehren Metcalfe
> - Aaron Meurer
> - mohammedouahman*
> - Lukas Molleman*
> - John Möller*
> - Suman mondal*
> - Jason Moore
> - Harry Mountain*
> - Arnab Nandi*
> - Harrison Oates*
> - omahs*
> - Victory Omole*
> - Julien Palard
> - Bobby Palmer*
> - Ishan Pandhare
> - Jay Patankar*
> - Prey Patel*
> - Abhishek Patidar
> - Idan Pazi*
> - Ivan Petukhov*
> - philwillnyc*
> - George Pittock*
> - platypus*
> - Advait Pote
> - James A. Preiss*
> - Dean Price*
> - Psycho-Pirate
> - Sophia Pustova*
> - Baiyuan Qiu*
> - Ravindu-Hirimuthugoda*
> - Juha Remes
> - Mikhail Remnev*
> - Tilo Reneau-Cardoso*
> - Matthias Rettl*
> - Mohamed Rezk*
> - Konstantinos Riganas*
> - Sam Ritchie*
> - Richard Rodenbusch*
> - Pedro Rosa*
> - Alberto Jiménez Ruiz*
> - Bhavik Sachdev*
> - Taylan Sahin*
> - Saicharan
> - Pablo Galindo Salgado
> - Richard Samuel*
> - Davide Sandonà
> - Raj Sapale
> - Gilles Schintgen
> - Nico Schlömer
> - Hanspeter Schmid
> - Alexis Schotte*
> - Vladimir Sereda*
> - Ankit Kumar Singh*
> - Sachin Singh*
> - Maciej Skórski*
> - Chris Smith
> - Henrique Soares*
> - Vivek Soni*
> - Timo Stienstra
> - Grace Su*
> - Kalevi Suominen
> - Daiki Takahashi
> - Diane Tchuindjo
> - Gerald Teschl*
> - Seb Tiburzio*
> - Tommaso Vaccari*
> - Geetika Vadali*
> - Viraj Vekaria*
> - Laurence Warne*
> - Daniel Weindl*
> - James Whitehead*
> - Lorenz Winkler*
> - Congxu Yang*
> - 袁野 (Yuan Ye)*
> - Lauren Yim*
> - Zedmat*
> - Shuai Zhou*
> - Zhenxu Zhu*
> - Alexander Zhura*
> - zzc*
>
> The SHA-256 hashes for the release are:
>
> 37392a943e14db2886543141c2121330887b6f834604a740a476f4b516315d11
> sympy-1.13.0rc1.tar.gz
> f6fce4b6b1ef4d89631fe81380f4e562e86615d2aef0bc3a17c4f1d0e3cd5dab
> sympy-1.13.0rc1-py3-none-any.whl
> b3b729284e791f4af8d792c67d7dbf30289563ff2acf3d6650c7eac7284e7f6d
> sympy-docs-html-1.13.0rc1.zip
> 14436f97e203918ca9655491e79b412b3452e46e3fefa61c5f3d544c874c5788
> sympy-docs-pdf-1.13.0rc1.pdf
>
> --
> Oscar
>
> --
> 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.google.com/d/msgid/sympy/CAHVvXxRUsh8CDHkJDc3dsYj4V_FkxWxa9MQpLSzw497bVni_9Q%40mail.gmail.com.

-- 
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.google.com/d/msgid/sympy/CAKgW%3D6%2BPQcwkJaGHXSMtxTwPGzQMzVPYdv4QVt7cPiqEDeQJpg%40mail.gmail.com.

Reply via email to