Skip to content

Commit

Permalink
Getting ready for release 2.8.8
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancescAlted committed Dec 11, 2023
1 parent 153e5f8 commit 4eae454
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 67 deletions.
35 changes: 13 additions & 22 deletions ANNOUNCE.rst
Original file line number Diff line number Diff line change
@@ -1,40 +1,31 @@
========================
Announcing NumExpr 2.8.7
Announcing NumExpr 2.8.8
========================

Hi everyone,

NumExpr 2.8.7 is a release to deal with issues related to downstream `pandas`
and other projects where the sanitization blacklist was triggering issues in their
evaluate. Hopefully, the new sanitization code would be much more robust now.

For those who do not wish to have sanitization on by default, it can be changed
by setting an environment variable, `NUMEXPR_SANITIZE=0`.

If you use `pandas` in your packages it is advisable you pin

`numexpr >= 2.8.7`

in your requirements.
NumExpr 2.8.8 is a release to deal mainly with issues appearing with
upcoming `NumPy` 2.0. Also, some small fixes (support for simple complex
expressions like `ne.evaluate('1.5j')`) and improvements are included.

Project documentation is available at:

http://numexpr.readthedocs.io/

Changes from 2.8.6 to 2.8.7
Changes from 2.8.7 to 2.8.8
---------------------------

* More permissive rules in sanitizing regular expression: allow to access digits
after the . with scientific notation. Thanks to Thomas Vincent.
* Fix re_evaluate not taking global_dict as argument. Thanks to Teng Liu
(@27rabbitlt).

* Don't reject double underscores that are not at the start or end of a variable
name (pandas uses those), or scientific-notation numbers with digits after the
decimal point. Thanks to Rebecca Palmer.
* Fix parsing of simple complex numbers. Now, `ne.evaluate('1.5j')` works.
Thanks to Teng Liu (@27rabbitlt).

* Do not use `numpy.alltrue` in the test suite, as it has been deprecated
(replaced by `numpy.all`). Thanks to Rebecca Chen.
* Fixes for upcoming NumPy 2.0:

* Wheels for Python 3.12. Wheels for 3.7 and 3.8 are not generated anymore.
* Replace npy_cdouble with C++ complex. Thanks to Teng Liu (@27rabbitlt).
* Add NE_MAXARGS for future numpy change NPY_MAXARGS. Now it is set to 64
to match NumPy 2.0 value. Thanks to Teng Liu (@27rabbitlt).

What's Numexpr?
---------------
Expand Down
66 changes: 26 additions & 40 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ NumExpr: Fast numerical expression evaluator for NumPy
======================================================

:Author: David M. Cooke, Francesc Alted, and others.
:Maintainer: Robert A. McLeod
:Contact: robbmcleod@gmail.com
:Maintainer: Francesc Alted
:Contact: faltet@gmail.com
:URL: https://github.com/pydata/numexpr
:Documentation: http://numexpr.readthedocs.io/en/latest/
:Travis CI: |travis|
Expand All @@ -24,20 +24,6 @@ NumExpr: Fast numerical expression evaluator for NumPy
.. |version| image:: https://img.shields.io/pypi/v/numexpr.png
:target: https://pypi.python.org/pypi/numexpr

IMPORTANT NOTE: NumExpr is looking for maintainers!
---------------------------------------------------

After 5 years as a solo maintainer (and performing a most excellent work), Robert McLeod
is asking for a well deserved break. So the NumExpr project is looking for a new
maintainer for a package that is used in pandas, PyTables and many other packages.
If you have benefited of NumExpr capabilities in the past, and are willing to contribute
back to the community, we would be happy to hear about you!

We are looking for someone that is knowledgeable about compiling extensions, and that is
ready to spend some cycles in making releases (2 or 3 a year, maybe even less!).
Interested? just open a new ticket here and we will help you onboarding.

Thank you!

What is NumExpr?
----------------
Expand Down Expand Up @@ -68,19 +54,19 @@ an integrated computing virtual machine. The array operands are split
into small chunks that easily fit in the cache of the CPU and passed
to the virtual machine. The virtual machine then applies the
operations on each chunk. It's worth noting that all temporaries and
constants in the expression are also chunked. Chunks are distributed among
the available cores of the CPU, resulting in highly parallelized code
constants in the expression are also chunked. Chunks are distributed among
the available cores of the CPU, resulting in highly parallelized code
execution.

The result is that NumExpr can get the most of your machine computing
capabilities for array-wise computations. Common speed-ups with regard
to NumPy are usually between 0.95x (for very simple expressions like
:code:`'a + 1'`) and 4x (for relatively complex ones like :code:`'a*b-4.1*a > 2.5*b'`),
although much higher speed-ups can be achieved for some functions and complex
:code:`'a + 1'`) and 4x (for relatively complex ones like :code:`'a*b-4.1*a > 2.5*b'`),
although much higher speed-ups can be achieved for some functions and complex
math operations (up to 15x in some cases).

NumExpr performs best on matrices that are too large to fit in L1 CPU cache.
In order to get a better idea on the different speed-ups that can be achieved
NumExpr performs best on matrices that are too large to fit in L1 CPU cache.
In order to get a better idea on the different speed-ups that can be achieved
on your platform, run the provided benchmarks.

Installation
Expand All @@ -89,32 +75,32 @@ Installation
From wheels
^^^^^^^^^^^

NumExpr is available for install via `pip` for a wide range of platforms and
Python versions (which may be browsed at: https://pypi.org/project/numexpr/#files).
NumExpr is available for install via `pip` for a wide range of platforms and
Python versions (which may be browsed at: https://pypi.org/project/numexpr/#files).
Installation can be performed as::

pip install numexpr

If you are using the Anaconda or Miniconda distribution of Python you may prefer
If you are using the Anaconda or Miniconda distribution of Python you may prefer
to use the `conda` package manager in this case::

conda install numexpr

From Source
^^^^^^^^^^^

On most \*nix systems your compilers will already be present. However if you
On most \*nix systems your compilers will already be present. However if you
are using a virtual environment with a substantially newer version of Python than
your system Python you may be prompted to install a new version of `gcc` or `clang`.

For Windows, you will need to install the Microsoft Visual C++ Build Tools
(which are free) first. The version depends on which version of Python you have
For Windows, you will need to install the Microsoft Visual C++ Build Tools
(which are free) first. The version depends on which version of Python you have
installed:

https://wiki.python.org/moin/WindowsCompilers

For Python 3.6+ simply installing the latest version of MSVC build tools should
be sufficient. Note that wheels found via pip do not include MKL support. Wheels
For Python 3.6+ simply installing the latest version of MSVC build tools should
be sufficient. Note that wheels found via pip do not include MKL support. Wheels
available via `conda` will have MKL, if the MKL backend is used for NumPy.

See `requirements.txt` for the required version of NumPy.
Expand All @@ -132,19 +118,19 @@ Do not test NumExpr in the source directory or you will generate import errors.
Enable Intel® MKL support
^^^^^^^^^^^^^^^^^^^^^^^^^

NumExpr includes support for Intel's MKL library. This may provide better
performance on Intel architectures, mainly when evaluating transcendental
functions (trigonometrical, exponential, ...).
NumExpr includes support for Intel's MKL library. This may provide better
performance on Intel architectures, mainly when evaluating transcendental
functions (trigonometrical, exponential, ...).

If you have Intel's MKL, copy the `site.cfg.example` that comes with the
distribution to `site.cfg` and edit the latter file to provide correct paths to
the MKL libraries in your system. After doing this, you can proceed with the
If you have Intel's MKL, copy the `site.cfg.example` that comes with the
distribution to `site.cfg` and edit the latter file to provide correct paths to
the MKL libraries in your system. After doing this, you can proceed with the
usual building instructions listed above.

Pay attention to the messages during the building process in order to know
whether MKL has been detected or not. Finally, you can check the speed-ups on
your machine by running the `bench/vml_timing.py` script (you can play with
different parameters to the `set_vml_accuracy_mode()` and `set_vml_num_threads()`
Pay attention to the messages during the building process in order to know
whether MKL has been detected or not. Finally, you can check the speed-ups on
your machine by running the `bench/vml_timing.py` script (you can play with
different parameters to the `set_vml_accuracy_mode()` and `set_vml_num_threads()`
functions in the script so as to see how it would affect performance).

Usage
Expand Down
13 changes: 12 additions & 1 deletion RELEASE_NOTES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ Release notes for NumExpr 2.8 series
Changes from 2.8.7 to 2.8.8
---------------------------

* **Under development.**
* Fix re_evaluate not taking global_dict as argument. Thanks to Teng Liu
(@27rabbitlt).

* Fix parsing of simple complex numbers. Now, `ne.evaluate('1.5j')` works.
Thanks to Teng Liu (@27rabbitlt).

* Fixes for upcoming NumPy 2.0:

* Replace npy_cdouble with C++ complex. Thanks to Teng Liu (@27rabbitlt).
* Add NE_MAXARGS for future numpy change NPY_MAXARGS. Now it is set to 64
to match NumPy 2.0 value. Thanks to Teng Liu (@27rabbitlt).


Changes from 2.8.6 to 2.8.7
---------------------------
Expand Down
6 changes: 3 additions & 3 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Releasing NumExpr
==================

* Author: Robert A. McLeod
* Contact: robbmcleod@gmail.com
* Date: 2020-12-28
* Author: Robert A. McLeod, Francesc Alted
* Contact: faltet@gmail.com
* Date: 2023-12-11

Following are notes for releasing NumExpr.

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = numexpr
version = 2.8.8.dev1
version = 2.8.8
description = Fast numerical expression evaluator for NumPy
author = David M. Cooke, Francesc Alted, and others
maintainer = Robert A. McLeod
Expand Down

0 comments on commit 4eae454

Please sign in to comment.