From 4eae454b99fe5efffb93a1dff52ebb25fa253254 Mon Sep 17 00:00:00 2001 From: Francesc Alted Date: Mon, 11 Dec 2023 13:54:47 +0100 Subject: [PATCH] Getting ready for release 2.8.8 --- ANNOUNCE.rst | 35 ++++++++++--------------- README.rst | 66 +++++++++++++++++++---------------------------- RELEASE_NOTES.rst | 13 +++++++++- RELEASING.md | 6 ++--- setup.cfg | 2 +- 5 files changed, 55 insertions(+), 67 deletions(-) diff --git a/ANNOUNCE.rst b/ANNOUNCE.rst index 7059ab6..8f1670c 100644 --- a/ANNOUNCE.rst +++ b/ANNOUNCE.rst @@ -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? --------------- diff --git a/README.rst b/README.rst index e39c9c9..84755b6 100644 --- a/README.rst +++ b/README.rst @@ -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| @@ -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? ---------------- @@ -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 @@ -89,13 +75,13 @@ 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 @@ -103,18 +89,18 @@ to use the `conda` package manager in this case:: 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. @@ -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 diff --git a/RELEASE_NOTES.rst b/RELEASE_NOTES.rst index aa78d95..1323400 100644 --- a/RELEASE_NOTES.rst +++ b/RELEASE_NOTES.rst @@ -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 --------------------------- diff --git a/RELEASING.md b/RELEASING.md index efbbf16..e797838 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -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. diff --git a/setup.cfg b/setup.cfg index ce90ad8..a1ea9e6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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