numexpr 2.10.0__tar.gz → 2.10.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {numexpr-2.10.0 → numexpr-2.10.1}/ANNOUNCE.rst +15 -15
- {numexpr-2.10.0 → numexpr-2.10.1}/MANIFEST.in +1 -1
- numexpr-2.10.1/PKG-INFO +27 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/RELEASE_NOTES.rst +18 -0
- numexpr-2.10.1/VERSION +1 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/__init__.py +0 -2
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/interpreter.cpp +6 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/necompiler.py +1 -1
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/tests/test_numexpr.py +15 -14
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/utils.py +4 -4
- numexpr-2.10.1/numexpr/version.py +5 -0
- numexpr-2.10.1/numexpr.egg-info/PKG-INFO +27 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr.egg-info/SOURCES.txt +1 -2
- numexpr-2.10.1/numexpr.egg-info/requires.txt +1 -0
- numexpr-2.10.1/pyproject.toml +49 -0
- numexpr-2.10.1/requirements.txt +1 -0
- numexpr-2.10.1/setup.cfg +4 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/setup.py +9 -6
- numexpr-2.10.0/PKG-INFO +0 -212
- numexpr-2.10.0/numexpr/version.py +0 -4
- numexpr-2.10.0/numexpr.egg-info/PKG-INFO +0 -212
- numexpr-2.10.0/numexpr.egg-info/not-zip-safe +0 -1
- numexpr-2.10.0/numexpr.egg-info/requires.txt +0 -1
- numexpr-2.10.0/pyproject.toml +0 -7
- numexpr-2.10.0/requirements.txt +0 -1
- numexpr-2.10.0/setup.cfg +0 -34
- {numexpr-2.10.0 → numexpr-2.10.1}/AUTHORS.txt +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/LICENSE.txt +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/README.rst +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/bench/boolean_timing.py +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/bench/issue-36.py +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/bench/issue-47.py +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/bench/multidim.py +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/bench/poly.py +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/bench/timing.py +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/bench/unaligned-simple.py +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/bench/varying-expr.py +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/bench/vml_timing.py +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/bench/vml_timing2.py +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/bench/vml_timing3.py +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/complex_functions.hpp +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/cpuinfo.py +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/expressions.py +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/functions.hpp +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/interp_body.cpp +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/interpreter.hpp +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/missing_posix_functions.hpp +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/module.cpp +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/module.hpp +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/msvc_function_stubs.hpp +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/numexpr_config.hpp +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/numexpr_object.cpp +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/numexpr_object.hpp +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/opcodes.hpp +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/str-two-way.hpp +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/tests/__init__.py +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/win32/pthread.c +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/win32/pthread.h +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr/win32/stdint.h +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr.egg-info/dependency_links.txt +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/numexpr.egg-info/top_level.txt +0 -0
- {numexpr-2.10.0 → numexpr-2.10.1}/site.cfg.example +0 -0
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
Announcing NumExpr 2.
|
|
3
|
-
|
|
1
|
+
=========================
|
|
2
|
+
Announcing NumExpr 2.10.1
|
|
3
|
+
=========================
|
|
4
4
|
|
|
5
5
|
Hi everyone,
|
|
6
6
|
|
|
7
|
-
NumExpr 2.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
NumExpr 2.10.1 continues to establize the support for NumPy 2.0.0.
|
|
8
|
+
Also, the default number of 'safe' threads has been upgraded to 16
|
|
9
|
+
(instead of previous 8). Finally, preliminary support for Python 3.13;
|
|
10
|
+
thanks to Karolina Surma.
|
|
11
11
|
|
|
12
12
|
Project documentation is available at:
|
|
13
13
|
|
|
14
14
|
http://numexpr.readthedocs.io/
|
|
15
15
|
|
|
16
|
-
Changes from 2.
|
|
17
|
-
|
|
16
|
+
Changes from 2.9.0 to 2.10.0
|
|
17
|
+
----------------------------
|
|
18
18
|
|
|
19
|
-
* Support for
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
providing help and additional fixes. Fixes #463.
|
|
19
|
+
* Support for NumPy 2.0.0. This is still experimental, so please
|
|
20
|
+
report any issues you find. Thanks to Clément Robert and Thomas
|
|
21
|
+
Caswell for the work.
|
|
23
22
|
|
|
24
|
-
*
|
|
23
|
+
* Avoid erroring when OMP_NUM_THREADS is empty string. Thanks to
|
|
24
|
+
Patrick Hoefler.
|
|
25
25
|
|
|
26
|
-
*
|
|
26
|
+
* Do not warn if OMP_NUM_THREAD set.
|
|
27
27
|
|
|
28
28
|
What's Numexpr?
|
|
29
29
|
---------------
|
numexpr-2.10.1/PKG-INFO
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: numexpr
|
|
3
|
+
Version: 2.10.1
|
|
4
|
+
Summary: Fast numerical expression evaluator for NumPy
|
|
5
|
+
Author-email: "David M. Cooke, Francesc Alted, and others" <blosc@blosc.org>
|
|
6
|
+
Maintainer-email: Blosc Development Team <blosc@blosc.org>
|
|
7
|
+
Project-URL: homepage, https://github.com/pydata/numexpr
|
|
8
|
+
Project-URL: documentation, https://numexpr.readthedocs.io
|
|
9
|
+
Project-URL: repository, https://github.com/pydata/numexpr
|
|
10
|
+
Classifier: Development Status :: 6 - Mature
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Information Technology
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
17
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
+
Classifier: Operating System :: Unix
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
|
+
License-File: LICENSE.txt
|
|
26
|
+
License-File: AUTHORS.txt
|
|
27
|
+
Requires-Dist: numpy>=1.23.0
|
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
Release notes for NumExpr 2.10 series
|
|
3
3
|
=====================================
|
|
4
4
|
|
|
5
|
+
Changes from 2.10.0 to 2.10.1
|
|
6
|
+
-----------------------------
|
|
7
|
+
|
|
8
|
+
- The default number of 'safe' threads has been upgraded to 16 (instead of
|
|
9
|
+
previous 8). That means that if your CPU has > 16 cores, the default is
|
|
10
|
+
to use 16. You can always override this with the "NUMEXPR_MAX_THREADS"
|
|
11
|
+
environment variable.
|
|
12
|
+
|
|
13
|
+
- NumPy 1.23 is now the minimum supported.
|
|
14
|
+
|
|
15
|
+
- Preliminary support for Python 3.13. Thanks to Karolina Surma.
|
|
16
|
+
|
|
17
|
+
- Fix tests on nthreads detection (closes: #479). Thanks to @avalentino.
|
|
18
|
+
|
|
19
|
+
- The build process has been modernized and now uses the `pyproject.toml`
|
|
20
|
+
file for more of the configuration options.
|
|
21
|
+
|
|
22
|
+
|
|
5
23
|
Changes from 2.9.0 to 2.10.0
|
|
6
24
|
----------------------------
|
|
7
25
|
|
numexpr-2.10.1/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.10.1
|
|
@@ -28,8 +28,6 @@ is_cpu_amd_intel = False # DEPRECATION WARNING: WILL BE REMOVED IN FUTURE RELEAS
|
|
|
28
28
|
# cpuinfo imports were moved into the test submodule function that calls them
|
|
29
29
|
# to improve import times.
|
|
30
30
|
|
|
31
|
-
import os, os.path
|
|
32
|
-
import platform
|
|
33
31
|
from numexpr.expressions import E
|
|
34
32
|
from numexpr.necompiler import (NumExpr, disassemble, evaluate, re_evaluate,
|
|
35
33
|
validate)
|
|
@@ -47,6 +47,12 @@
|
|
|
47
47
|
#define AVAILABLE(Haystack, Haystack_Len, J, Needle_Len) \
|
|
48
48
|
((Haystack_Len) >= (J) + (Needle_Len))
|
|
49
49
|
|
|
50
|
+
// To allow building with NumPy<2 locally define the new NumPy macros:
|
|
51
|
+
#if NPY_ABI_VERSION < 0x02000000
|
|
52
|
+
#define PyDataType_ELSIZE(descr) ((descr)->elsize)
|
|
53
|
+
#define PyDataType_SET_ELSIZE(descr, size) (descr)->elsize = size
|
|
54
|
+
#endif
|
|
55
|
+
|
|
50
56
|
#include "str-two-way.hpp"
|
|
51
57
|
|
|
52
58
|
#ifdef DEBUG
|
|
@@ -767,7 +767,7 @@ def getArguments(names, local_dict=None, global_dict=None, _frame_depth: int=2):
|
|
|
767
767
|
# If we generated local_dict via an explicit reference to f_locals,
|
|
768
768
|
# clear the dict to prevent creating extra ref counts in the caller's scope
|
|
769
769
|
# See https://github.com/pydata/numexpr/issues/310
|
|
770
|
-
if clear_local_dict:
|
|
770
|
+
if clear_local_dict and hasattr(local_dict, 'clear'):
|
|
771
771
|
local_dict.clear()
|
|
772
772
|
|
|
773
773
|
return arguments
|
|
@@ -41,6 +41,7 @@ TestCase = unittest.TestCase
|
|
|
41
41
|
|
|
42
42
|
double = np.double
|
|
43
43
|
long = int
|
|
44
|
+
MAX_THREADS = 16
|
|
44
45
|
|
|
45
46
|
|
|
46
47
|
class test_numexpr(TestCase):
|
|
@@ -1164,14 +1165,14 @@ class test_threading_config(TestCase):
|
|
|
1164
1165
|
if 'sparc' in platform.machine():
|
|
1165
1166
|
self.assertEqual(1, numexpr._init_num_threads())
|
|
1166
1167
|
else:
|
|
1167
|
-
self.assertEqual(detect_number_of_cores(), numexpr._init_num_threads())
|
|
1168
|
+
self.assertEqual(min(detect_number_of_cores(), MAX_THREADS), numexpr._init_num_threads())
|
|
1168
1169
|
|
|
1169
1170
|
def test_numexpr_max_threads_empty_string(self):
|
|
1170
1171
|
with _environment('NUMEXPR_MAX_THREADS', ''):
|
|
1171
1172
|
if 'sparc' in platform.machine():
|
|
1172
1173
|
self.assertEqual(1, numexpr._init_num_threads())
|
|
1173
1174
|
else:
|
|
1174
|
-
self.assertEqual(detect_number_of_cores(), numexpr._init_num_threads())
|
|
1175
|
+
self.assertEqual(min(detect_number_of_cores(), MAX_THREADS), numexpr._init_num_threads())
|
|
1175
1176
|
|
|
1176
1177
|
def test_vml_threads_round_trip(self):
|
|
1177
1178
|
n_threads = 3
|
|
@@ -1315,28 +1316,28 @@ def suite():
|
|
|
1315
1316
|
add_method(func)
|
|
1316
1317
|
|
|
1317
1318
|
for n in range(niter):
|
|
1318
|
-
theSuite.addTest(unittest.
|
|
1319
|
+
theSuite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(test_numexpr))
|
|
1319
1320
|
if 'sparc' not in platform.machine():
|
|
1320
|
-
theSuite.addTest(unittest.
|
|
1321
|
-
theSuite.addTest(unittest.
|
|
1322
|
-
theSuite.addTest(unittest.
|
|
1323
|
-
theSuite.addTest(unittest.
|
|
1324
|
-
theSuite.addTest(unittest.
|
|
1325
|
-
theSuite.addTest(unittest.
|
|
1321
|
+
theSuite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(test_numexpr2))
|
|
1322
|
+
theSuite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(test_evaluate))
|
|
1323
|
+
theSuite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(TestExpressions))
|
|
1324
|
+
theSuite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(test_int32_int64))
|
|
1325
|
+
theSuite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(test_uint32_int64))
|
|
1326
|
+
theSuite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(test_strings))
|
|
1326
1327
|
theSuite.addTest(
|
|
1327
|
-
unittest.
|
|
1328
|
-
theSuite.addTest(unittest.
|
|
1329
|
-
theSuite.addTest(unittest.
|
|
1328
|
+
unittest.defaultTestLoader.loadTestsFromTestCase(test_irregular_stride))
|
|
1329
|
+
theSuite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(test_zerodim))
|
|
1330
|
+
theSuite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(test_threading_config))
|
|
1330
1331
|
|
|
1331
1332
|
# multiprocessing module is not supported on Hurd/kFreeBSD
|
|
1332
1333
|
if (pl.system().lower() not in ('gnu', 'gnu/kfreebsd')):
|
|
1333
|
-
theSuite.addTest(unittest.
|
|
1334
|
+
theSuite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(test_subprocess))
|
|
1334
1335
|
|
|
1335
1336
|
# I need to put this test after test_subprocess because
|
|
1336
1337
|
# if not, the test suite locks immediately before test_subproces.
|
|
1337
1338
|
# This only happens with Windows, so I suspect of a subtle bad
|
|
1338
1339
|
# interaction with threads and subprocess :-/
|
|
1339
|
-
theSuite.addTest(unittest.
|
|
1340
|
+
theSuite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(test_threading))
|
|
1340
1341
|
|
|
1341
1342
|
return theSuite
|
|
1342
1343
|
|
|
@@ -143,10 +143,10 @@ def _init_num_threads():
|
|
|
143
143
|
# configured NumExpr as desired, so we emit info logs.
|
|
144
144
|
if n_cores > MAX_THREADS:
|
|
145
145
|
log.info('Note: detected %d virtual cores but NumExpr set to maximum of %d, check "NUMEXPR_MAX_THREADS" environment variable.'%(n_cores, MAX_THREADS))
|
|
146
|
-
if n_cores >
|
|
147
|
-
#
|
|
148
|
-
log.info('Note: NumExpr detected %d cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of
|
|
149
|
-
n_cores =
|
|
146
|
+
if n_cores > 16:
|
|
147
|
+
# Back in 2019, 8 threads would be considered safe for performance. We are in 2024 now, so adjusting.
|
|
148
|
+
log.info('Note: NumExpr detected %d cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 16.'%n_cores)
|
|
149
|
+
n_cores = 16
|
|
150
150
|
|
|
151
151
|
# Now we check for 'NUMEXPR_NUM_THREADS' or 'OMP_NUM_THREADS' to set the
|
|
152
152
|
# actual number of threads used.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: numexpr
|
|
3
|
+
Version: 2.10.1
|
|
4
|
+
Summary: Fast numerical expression evaluator for NumPy
|
|
5
|
+
Author-email: "David M. Cooke, Francesc Alted, and others" <blosc@blosc.org>
|
|
6
|
+
Maintainer-email: Blosc Development Team <blosc@blosc.org>
|
|
7
|
+
Project-URL: homepage, https://github.com/pydata/numexpr
|
|
8
|
+
Project-URL: documentation, https://numexpr.readthedocs.io
|
|
9
|
+
Project-URL: repository, https://github.com/pydata/numexpr
|
|
10
|
+
Classifier: Development Status :: 6 - Mature
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Intended Audience :: Information Technology
|
|
13
|
+
Classifier: Intended Audience :: Science/Research
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python
|
|
16
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
17
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
18
|
+
Classifier: Operating System :: Unix
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
24
|
+
Requires-Python: >=3.9
|
|
25
|
+
License-File: LICENSE.txt
|
|
26
|
+
License-File: AUTHORS.txt
|
|
27
|
+
Requires-Dist: numpy>=1.23.0
|
|
@@ -4,9 +4,9 @@ LICENSE.txt
|
|
|
4
4
|
MANIFEST.in
|
|
5
5
|
README.rst
|
|
6
6
|
RELEASE_NOTES.rst
|
|
7
|
+
VERSION
|
|
7
8
|
pyproject.toml
|
|
8
9
|
requirements.txt
|
|
9
|
-
setup.cfg
|
|
10
10
|
setup.py
|
|
11
11
|
site.cfg.example
|
|
12
12
|
bench/boolean_timing.py
|
|
@@ -43,7 +43,6 @@ numexpr/version.py
|
|
|
43
43
|
numexpr.egg-info/PKG-INFO
|
|
44
44
|
numexpr.egg-info/SOURCES.txt
|
|
45
45
|
numexpr.egg-info/dependency_links.txt
|
|
46
|
-
numexpr.egg-info/not-zip-safe
|
|
47
46
|
numexpr.egg-info/requires.txt
|
|
48
47
|
numexpr.egg-info/top_level.txt
|
|
49
48
|
numexpr/win32/pthread.c
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
numpy>=1.23.0
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [
|
|
3
|
+
"setuptools",
|
|
4
|
+
"wheel",
|
|
5
|
+
"numpy>=2.0.0",
|
|
6
|
+
]
|
|
7
|
+
build-backend = "setuptools.build_meta"
|
|
8
|
+
|
|
9
|
+
[tool.setuptools.packages.find]
|
|
10
|
+
include = ["numexpr"]
|
|
11
|
+
|
|
12
|
+
[project]
|
|
13
|
+
name = "numexpr"
|
|
14
|
+
description = "Fast numerical expression evaluator for NumPy"
|
|
15
|
+
authors = [{name = "David M. Cooke, Francesc Alted, and others", email = "blosc@blosc.org"}]
|
|
16
|
+
maintainers = [{ name = "Blosc Development Team", email = "blosc@blosc.org"}]
|
|
17
|
+
classifiers = [
|
|
18
|
+
"Development Status :: 6 - Mature",
|
|
19
|
+
"Intended Audience :: Developers",
|
|
20
|
+
"Intended Audience :: Information Technology",
|
|
21
|
+
"Intended Audience :: Science/Research",
|
|
22
|
+
"License :: OSI Approved :: MIT License",
|
|
23
|
+
"Programming Language :: Python",
|
|
24
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
25
|
+
"Operating System :: Microsoft :: Windows",
|
|
26
|
+
"Operating System :: Unix",
|
|
27
|
+
"Programming Language :: Python :: 3",
|
|
28
|
+
"Programming Language :: Python :: 3.9",
|
|
29
|
+
"Programming Language :: Python :: 3.10",
|
|
30
|
+
"Programming Language :: Python :: 3.11",
|
|
31
|
+
"Programming Language :: Python :: 3.12",
|
|
32
|
+
]
|
|
33
|
+
requires-python = ">=3.9"
|
|
34
|
+
# Follow guidelines from https://scientific-python.org/specs/spec-0000/
|
|
35
|
+
dependencies = [
|
|
36
|
+
"numpy>=1.23.0",
|
|
37
|
+
]
|
|
38
|
+
dynamic = ["version"]
|
|
39
|
+
|
|
40
|
+
[project.urls]
|
|
41
|
+
homepage = "https://github.com/pydata/numexpr"
|
|
42
|
+
documentation = "https://numexpr.readthedocs.io"
|
|
43
|
+
repository = "https://github.com/pydata/numexpr"
|
|
44
|
+
|
|
45
|
+
[tool.cibuildwheel]
|
|
46
|
+
skip = "cp36-* cp37-* pp37-* cp38-* pp* *-manylinux_i686 *_ppc64le *_s390x"
|
|
47
|
+
# Let's use a more recent version of the manylinux image for more modern compilers
|
|
48
|
+
manylinux-x86_64-image = "manylinux_2_28"
|
|
49
|
+
manylinux-aarch64-image = "manylinux_2_28"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
numpy >= 1.23.0 # keep in sync with NPY_TARGET_VERSION (setup.py)
|
numexpr-2.10.1/setup.cfg
ADDED
|
@@ -10,19 +10,21 @@
|
|
|
10
10
|
####################################################################
|
|
11
11
|
|
|
12
12
|
import os, os.path as op
|
|
13
|
-
from setuptools import setup, Extension
|
|
14
13
|
import platform
|
|
15
14
|
import configparser
|
|
16
15
|
import numpy as np
|
|
16
|
+
from setuptools import setup, Extension
|
|
17
|
+
|
|
17
18
|
|
|
18
19
|
with open('requirements.txt') as f:
|
|
19
20
|
requirements = f.read().splitlines()
|
|
20
21
|
|
|
22
|
+
version = open("VERSION").read().strip()
|
|
21
23
|
with open('numexpr/version.py', 'w') as fh:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
fh.write(
|
|
25
|
-
fh.write("version = '
|
|
24
|
+
# Create the version.py file
|
|
25
|
+
fh.write("# THIS FILE IS GENERATED BY `setup.py`\n")
|
|
26
|
+
fh.write(f"__version__ = '{version}'\n")
|
|
27
|
+
fh.write(f"version = '{version}'\n")
|
|
26
28
|
try:
|
|
27
29
|
fh.write("numpy_build_version = '%s'\n" % np.__version__)
|
|
28
30
|
except ImportError:
|
|
@@ -35,7 +37,7 @@ libs = [] # Pre-built libraries ONLY, like python36.so
|
|
|
35
37
|
clibs = []
|
|
36
38
|
def_macros = [
|
|
37
39
|
# keep in sync with minimal runtime requirement (requirements.txt)
|
|
38
|
-
('NPY_TARGET_VERSION', '
|
|
40
|
+
('NPY_TARGET_VERSION', 'NPY_1_23_API_VERSION')
|
|
39
41
|
]
|
|
40
42
|
sources = ['numexpr/interpreter.cpp',
|
|
41
43
|
'numexpr/module.cpp',
|
|
@@ -98,6 +100,7 @@ def setup_package():
|
|
|
98
100
|
)
|
|
99
101
|
|
|
100
102
|
metadata = dict(
|
|
103
|
+
version=version,
|
|
101
104
|
install_requires=requirements,
|
|
102
105
|
libraries=clibs,
|
|
103
106
|
ext_modules=[
|
numexpr-2.10.0/PKG-INFO
DELETED
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: numexpr
|
|
3
|
-
Version: 2.10.0
|
|
4
|
-
Summary: Fast numerical expression evaluator for NumPy
|
|
5
|
-
Home-page: https://github.com/pydata/numexpr
|
|
6
|
-
Author: David M. Cooke, Francesc Alted, and others
|
|
7
|
-
Maintainer: Francesc Alted
|
|
8
|
-
Maintainer-email: faltet@gmail.com
|
|
9
|
-
License: MIT
|
|
10
|
-
Classifier: Development Status :: 6 - Mature
|
|
11
|
-
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
12
|
-
Classifier: Intended Audience :: Science/Research
|
|
13
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
20
|
-
Classifier: Operating System :: POSIX
|
|
21
|
-
Classifier: Operating System :: MacOS
|
|
22
|
-
Requires-Python: >=3.9
|
|
23
|
-
Description-Content-Type: text/x-rst
|
|
24
|
-
License-File: LICENSE.txt
|
|
25
|
-
License-File: AUTHORS.txt
|
|
26
|
-
Requires-Dist: numpy>=1.19.3
|
|
27
|
-
|
|
28
|
-
======================================================
|
|
29
|
-
NumExpr: Fast numerical expression evaluator for NumPy
|
|
30
|
-
======================================================
|
|
31
|
-
|
|
32
|
-
:Author: David M. Cooke, Francesc Alted, and others.
|
|
33
|
-
:Maintainer: Francesc Alted
|
|
34
|
-
:Contact: faltet@gmail.com
|
|
35
|
-
:URL: https://github.com/pydata/numexpr
|
|
36
|
-
:Documentation: http://numexpr.readthedocs.io/en/latest/
|
|
37
|
-
:GitHub Actions: |actions|
|
|
38
|
-
:PyPi: |version|
|
|
39
|
-
:DOI: |doi|
|
|
40
|
-
:readthedocs: |docs|
|
|
41
|
-
|
|
42
|
-
.. |actions| image:: https://github.com/pydata/numexpr/workflows/Build/badge.svg
|
|
43
|
-
:target: https://github.com/pydata/numexpr/actions
|
|
44
|
-
.. |travis| image:: https://travis-ci.org/pydata/numexpr.png?branch=master
|
|
45
|
-
:target: https://travis-ci.org/pydata/numexpr
|
|
46
|
-
.. |docs| image:: https://readthedocs.org/projects/numexpr/badge/?version=latest
|
|
47
|
-
:target: http://numexpr.readthedocs.io/en/latest
|
|
48
|
-
.. |doi| image:: https://zenodo.org/badge/doi/10.5281/zenodo.2483274.svg
|
|
49
|
-
:target: https://doi.org/10.5281/zenodo.2483274
|
|
50
|
-
.. |version| image:: https://img.shields.io/pypi/v/numexpr
|
|
51
|
-
:target: https://pypi.python.org/pypi/numexpr
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
What is NumExpr?
|
|
55
|
-
----------------
|
|
56
|
-
|
|
57
|
-
NumExpr is a fast numerical expression evaluator for NumPy. With it,
|
|
58
|
-
expressions that operate on arrays (like :code:`'3*a+4*b'`) are accelerated
|
|
59
|
-
and use less memory than doing the same calculation in Python.
|
|
60
|
-
|
|
61
|
-
In addition, its multi-threaded capabilities can make use of all your
|
|
62
|
-
cores -- which generally results in substantial performance scaling compared
|
|
63
|
-
to NumPy.
|
|
64
|
-
|
|
65
|
-
Last but not least, numexpr can make use of Intel's VML (Vector Math
|
|
66
|
-
Library, normally integrated in its Math Kernel Library, or MKL).
|
|
67
|
-
This allows further acceleration of transcendent expressions.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
How NumExpr achieves high performance
|
|
71
|
-
-------------------------------------
|
|
72
|
-
|
|
73
|
-
The main reason why NumExpr achieves better performance than NumPy is
|
|
74
|
-
that it avoids allocating memory for intermediate results. This
|
|
75
|
-
results in better cache utilization and reduces memory access in
|
|
76
|
-
general. Due to this, NumExpr works best with large arrays.
|
|
77
|
-
|
|
78
|
-
NumExpr parses expressions into its own op-codes that are then used by
|
|
79
|
-
an integrated computing virtual machine. The array operands are split
|
|
80
|
-
into small chunks that easily fit in the cache of the CPU and passed
|
|
81
|
-
to the virtual machine. The virtual machine then applies the
|
|
82
|
-
operations on each chunk. It's worth noting that all temporaries and
|
|
83
|
-
constants in the expression are also chunked. Chunks are distributed among
|
|
84
|
-
the available cores of the CPU, resulting in highly parallelized code
|
|
85
|
-
execution.
|
|
86
|
-
|
|
87
|
-
The result is that NumExpr can get the most of your machine computing
|
|
88
|
-
capabilities for array-wise computations. Common speed-ups with regard
|
|
89
|
-
to NumPy are usually between 0.95x (for very simple expressions like
|
|
90
|
-
:code:`'a + 1'`) and 4x (for relatively complex ones like :code:`'a*b-4.1*a > 2.5*b'`),
|
|
91
|
-
although much higher speed-ups can be achieved for some functions and complex
|
|
92
|
-
math operations (up to 15x in some cases).
|
|
93
|
-
|
|
94
|
-
NumExpr performs best on matrices that are too large to fit in L1 CPU cache.
|
|
95
|
-
In order to get a better idea on the different speed-ups that can be achieved
|
|
96
|
-
on your platform, run the provided benchmarks.
|
|
97
|
-
|
|
98
|
-
Installation
|
|
99
|
-
------------
|
|
100
|
-
|
|
101
|
-
From wheels
|
|
102
|
-
^^^^^^^^^^^
|
|
103
|
-
|
|
104
|
-
NumExpr is available for install via `pip` for a wide range of platforms and
|
|
105
|
-
Python versions (which may be browsed at: https://pypi.org/project/numexpr/#files).
|
|
106
|
-
Installation can be performed as::
|
|
107
|
-
|
|
108
|
-
pip install numexpr
|
|
109
|
-
|
|
110
|
-
If you are using the Anaconda or Miniconda distribution of Python you may prefer
|
|
111
|
-
to use the `conda` package manager in this case::
|
|
112
|
-
|
|
113
|
-
conda install numexpr
|
|
114
|
-
|
|
115
|
-
From Source
|
|
116
|
-
^^^^^^^^^^^
|
|
117
|
-
|
|
118
|
-
On most \*nix systems your compilers will already be present. However if you
|
|
119
|
-
are using a virtual environment with a substantially newer version of Python than
|
|
120
|
-
your system Python you may be prompted to install a new version of `gcc` or `clang`.
|
|
121
|
-
|
|
122
|
-
For Windows, you will need to install the Microsoft Visual C++ Build Tools
|
|
123
|
-
(which are free) first. The version depends on which version of Python you have
|
|
124
|
-
installed:
|
|
125
|
-
|
|
126
|
-
https://wiki.python.org/moin/WindowsCompilers
|
|
127
|
-
|
|
128
|
-
For Python 3.6+ simply installing the latest version of MSVC build tools should
|
|
129
|
-
be sufficient. Note that wheels found via pip do not include MKL support. Wheels
|
|
130
|
-
available via `conda` will have MKL, if the MKL backend is used for NumPy.
|
|
131
|
-
|
|
132
|
-
See `requirements.txt` for the required version of NumPy.
|
|
133
|
-
|
|
134
|
-
NumExpr is built in the standard Python way::
|
|
135
|
-
|
|
136
|
-
python setup.py build install
|
|
137
|
-
|
|
138
|
-
You can test `numexpr` with::
|
|
139
|
-
|
|
140
|
-
python -c "import numexpr; numexpr.test()"
|
|
141
|
-
|
|
142
|
-
Do not test NumExpr in the source directory or you will generate import errors.
|
|
143
|
-
|
|
144
|
-
Enable Intel® MKL support
|
|
145
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
146
|
-
|
|
147
|
-
NumExpr includes support for Intel's MKL library. This may provide better
|
|
148
|
-
performance on Intel architectures, mainly when evaluating transcendental
|
|
149
|
-
functions (trigonometrical, exponential, ...).
|
|
150
|
-
|
|
151
|
-
If you have Intel's MKL, copy the `site.cfg.example` that comes with the
|
|
152
|
-
distribution to `site.cfg` and edit the latter file to provide correct paths to
|
|
153
|
-
the MKL libraries in your system. After doing this, you can proceed with the
|
|
154
|
-
usual building instructions listed above.
|
|
155
|
-
|
|
156
|
-
Pay attention to the messages during the building process in order to know
|
|
157
|
-
whether MKL has been detected or not. Finally, you can check the speed-ups on
|
|
158
|
-
your machine by running the `bench/vml_timing.py` script (you can play with
|
|
159
|
-
different parameters to the `set_vml_accuracy_mode()` and `set_vml_num_threads()`
|
|
160
|
-
functions in the script so as to see how it would affect performance).
|
|
161
|
-
|
|
162
|
-
Usage
|
|
163
|
-
-----
|
|
164
|
-
|
|
165
|
-
::
|
|
166
|
-
|
|
167
|
-
>>> import numpy as np
|
|
168
|
-
>>> import numexpr as ne
|
|
169
|
-
|
|
170
|
-
>>> a = np.arange(1e6) # Choose large arrays for better speedups
|
|
171
|
-
>>> b = np.arange(1e6)
|
|
172
|
-
|
|
173
|
-
>>> ne.evaluate("a + 1") # a simple expression
|
|
174
|
-
array([ 1.00000000e+00, 2.00000000e+00, 3.00000000e+00, ...,
|
|
175
|
-
9.99998000e+05, 9.99999000e+05, 1.00000000e+06])
|
|
176
|
-
|
|
177
|
-
>>> ne.evaluate("a * b - 4.1 * a > 2.5 * b") # a more complex one
|
|
178
|
-
array([False, False, False, ..., True, True, True], dtype=bool)
|
|
179
|
-
|
|
180
|
-
>>> ne.evaluate("sin(a) + arcsinh(a/b)") # you can also use functions
|
|
181
|
-
array([ NaN, 1.72284457, 1.79067101, ..., 1.09567006,
|
|
182
|
-
0.17523598, -0.09597844])
|
|
183
|
-
|
|
184
|
-
>>> s = np.array([b'abba', b'abbb', b'abbcdef'])
|
|
185
|
-
>>> ne.evaluate("b'abba' == s") # string arrays are supported too
|
|
186
|
-
array([ True, False, False], dtype=bool)
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
Documentation
|
|
190
|
-
-------------
|
|
191
|
-
|
|
192
|
-
Please see the official documentation at `numexpr.readthedocs.io <https://numexpr.readthedocs.io>`_.
|
|
193
|
-
Included is a user guide, benchmark results, and the reference API.
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
Authors
|
|
197
|
-
-------
|
|
198
|
-
|
|
199
|
-
Please see `AUTHORS.txt <https://github.com/pydata/numexpr/blob/master/AUTHORS.txt>`_.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
License
|
|
203
|
-
-------
|
|
204
|
-
|
|
205
|
-
NumExpr is distributed under the `MIT <http://www.opensource.org/licenses/mit-license.php>`_ license.
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
.. Local Variables:
|
|
209
|
-
.. mode: text
|
|
210
|
-
.. coding: utf-8
|
|
211
|
-
.. fill-column: 70
|
|
212
|
-
.. End:
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: numexpr
|
|
3
|
-
Version: 2.10.0
|
|
4
|
-
Summary: Fast numerical expression evaluator for NumPy
|
|
5
|
-
Home-page: https://github.com/pydata/numexpr
|
|
6
|
-
Author: David M. Cooke, Francesc Alted, and others
|
|
7
|
-
Maintainer: Francesc Alted
|
|
8
|
-
Maintainer-email: faltet@gmail.com
|
|
9
|
-
License: MIT
|
|
10
|
-
Classifier: Development Status :: 6 - Mature
|
|
11
|
-
Classifier: Intended Audience :: Financial and Insurance Industry
|
|
12
|
-
Classifier: Intended Audience :: Science/Research
|
|
13
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
-
Classifier: Operating System :: Microsoft :: Windows
|
|
20
|
-
Classifier: Operating System :: POSIX
|
|
21
|
-
Classifier: Operating System :: MacOS
|
|
22
|
-
Requires-Python: >=3.9
|
|
23
|
-
Description-Content-Type: text/x-rst
|
|
24
|
-
License-File: LICENSE.txt
|
|
25
|
-
License-File: AUTHORS.txt
|
|
26
|
-
Requires-Dist: numpy>=1.19.3
|
|
27
|
-
|
|
28
|
-
======================================================
|
|
29
|
-
NumExpr: Fast numerical expression evaluator for NumPy
|
|
30
|
-
======================================================
|
|
31
|
-
|
|
32
|
-
:Author: David M. Cooke, Francesc Alted, and others.
|
|
33
|
-
:Maintainer: Francesc Alted
|
|
34
|
-
:Contact: faltet@gmail.com
|
|
35
|
-
:URL: https://github.com/pydata/numexpr
|
|
36
|
-
:Documentation: http://numexpr.readthedocs.io/en/latest/
|
|
37
|
-
:GitHub Actions: |actions|
|
|
38
|
-
:PyPi: |version|
|
|
39
|
-
:DOI: |doi|
|
|
40
|
-
:readthedocs: |docs|
|
|
41
|
-
|
|
42
|
-
.. |actions| image:: https://github.com/pydata/numexpr/workflows/Build/badge.svg
|
|
43
|
-
:target: https://github.com/pydata/numexpr/actions
|
|
44
|
-
.. |travis| image:: https://travis-ci.org/pydata/numexpr.png?branch=master
|
|
45
|
-
:target: https://travis-ci.org/pydata/numexpr
|
|
46
|
-
.. |docs| image:: https://readthedocs.org/projects/numexpr/badge/?version=latest
|
|
47
|
-
:target: http://numexpr.readthedocs.io/en/latest
|
|
48
|
-
.. |doi| image:: https://zenodo.org/badge/doi/10.5281/zenodo.2483274.svg
|
|
49
|
-
:target: https://doi.org/10.5281/zenodo.2483274
|
|
50
|
-
.. |version| image:: https://img.shields.io/pypi/v/numexpr
|
|
51
|
-
:target: https://pypi.python.org/pypi/numexpr
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
What is NumExpr?
|
|
55
|
-
----------------
|
|
56
|
-
|
|
57
|
-
NumExpr is a fast numerical expression evaluator for NumPy. With it,
|
|
58
|
-
expressions that operate on arrays (like :code:`'3*a+4*b'`) are accelerated
|
|
59
|
-
and use less memory than doing the same calculation in Python.
|
|
60
|
-
|
|
61
|
-
In addition, its multi-threaded capabilities can make use of all your
|
|
62
|
-
cores -- which generally results in substantial performance scaling compared
|
|
63
|
-
to NumPy.
|
|
64
|
-
|
|
65
|
-
Last but not least, numexpr can make use of Intel's VML (Vector Math
|
|
66
|
-
Library, normally integrated in its Math Kernel Library, or MKL).
|
|
67
|
-
This allows further acceleration of transcendent expressions.
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
How NumExpr achieves high performance
|
|
71
|
-
-------------------------------------
|
|
72
|
-
|
|
73
|
-
The main reason why NumExpr achieves better performance than NumPy is
|
|
74
|
-
that it avoids allocating memory for intermediate results. This
|
|
75
|
-
results in better cache utilization and reduces memory access in
|
|
76
|
-
general. Due to this, NumExpr works best with large arrays.
|
|
77
|
-
|
|
78
|
-
NumExpr parses expressions into its own op-codes that are then used by
|
|
79
|
-
an integrated computing virtual machine. The array operands are split
|
|
80
|
-
into small chunks that easily fit in the cache of the CPU and passed
|
|
81
|
-
to the virtual machine. The virtual machine then applies the
|
|
82
|
-
operations on each chunk. It's worth noting that all temporaries and
|
|
83
|
-
constants in the expression are also chunked. Chunks are distributed among
|
|
84
|
-
the available cores of the CPU, resulting in highly parallelized code
|
|
85
|
-
execution.
|
|
86
|
-
|
|
87
|
-
The result is that NumExpr can get the most of your machine computing
|
|
88
|
-
capabilities for array-wise computations. Common speed-ups with regard
|
|
89
|
-
to NumPy are usually between 0.95x (for very simple expressions like
|
|
90
|
-
:code:`'a + 1'`) and 4x (for relatively complex ones like :code:`'a*b-4.1*a > 2.5*b'`),
|
|
91
|
-
although much higher speed-ups can be achieved for some functions and complex
|
|
92
|
-
math operations (up to 15x in some cases).
|
|
93
|
-
|
|
94
|
-
NumExpr performs best on matrices that are too large to fit in L1 CPU cache.
|
|
95
|
-
In order to get a better idea on the different speed-ups that can be achieved
|
|
96
|
-
on your platform, run the provided benchmarks.
|
|
97
|
-
|
|
98
|
-
Installation
|
|
99
|
-
------------
|
|
100
|
-
|
|
101
|
-
From wheels
|
|
102
|
-
^^^^^^^^^^^
|
|
103
|
-
|
|
104
|
-
NumExpr is available for install via `pip` for a wide range of platforms and
|
|
105
|
-
Python versions (which may be browsed at: https://pypi.org/project/numexpr/#files).
|
|
106
|
-
Installation can be performed as::
|
|
107
|
-
|
|
108
|
-
pip install numexpr
|
|
109
|
-
|
|
110
|
-
If you are using the Anaconda or Miniconda distribution of Python you may prefer
|
|
111
|
-
to use the `conda` package manager in this case::
|
|
112
|
-
|
|
113
|
-
conda install numexpr
|
|
114
|
-
|
|
115
|
-
From Source
|
|
116
|
-
^^^^^^^^^^^
|
|
117
|
-
|
|
118
|
-
On most \*nix systems your compilers will already be present. However if you
|
|
119
|
-
are using a virtual environment with a substantially newer version of Python than
|
|
120
|
-
your system Python you may be prompted to install a new version of `gcc` or `clang`.
|
|
121
|
-
|
|
122
|
-
For Windows, you will need to install the Microsoft Visual C++ Build Tools
|
|
123
|
-
(which are free) first. The version depends on which version of Python you have
|
|
124
|
-
installed:
|
|
125
|
-
|
|
126
|
-
https://wiki.python.org/moin/WindowsCompilers
|
|
127
|
-
|
|
128
|
-
For Python 3.6+ simply installing the latest version of MSVC build tools should
|
|
129
|
-
be sufficient. Note that wheels found via pip do not include MKL support. Wheels
|
|
130
|
-
available via `conda` will have MKL, if the MKL backend is used for NumPy.
|
|
131
|
-
|
|
132
|
-
See `requirements.txt` for the required version of NumPy.
|
|
133
|
-
|
|
134
|
-
NumExpr is built in the standard Python way::
|
|
135
|
-
|
|
136
|
-
python setup.py build install
|
|
137
|
-
|
|
138
|
-
You can test `numexpr` with::
|
|
139
|
-
|
|
140
|
-
python -c "import numexpr; numexpr.test()"
|
|
141
|
-
|
|
142
|
-
Do not test NumExpr in the source directory or you will generate import errors.
|
|
143
|
-
|
|
144
|
-
Enable Intel® MKL support
|
|
145
|
-
^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
146
|
-
|
|
147
|
-
NumExpr includes support for Intel's MKL library. This may provide better
|
|
148
|
-
performance on Intel architectures, mainly when evaluating transcendental
|
|
149
|
-
functions (trigonometrical, exponential, ...).
|
|
150
|
-
|
|
151
|
-
If you have Intel's MKL, copy the `site.cfg.example` that comes with the
|
|
152
|
-
distribution to `site.cfg` and edit the latter file to provide correct paths to
|
|
153
|
-
the MKL libraries in your system. After doing this, you can proceed with the
|
|
154
|
-
usual building instructions listed above.
|
|
155
|
-
|
|
156
|
-
Pay attention to the messages during the building process in order to know
|
|
157
|
-
whether MKL has been detected or not. Finally, you can check the speed-ups on
|
|
158
|
-
your machine by running the `bench/vml_timing.py` script (you can play with
|
|
159
|
-
different parameters to the `set_vml_accuracy_mode()` and `set_vml_num_threads()`
|
|
160
|
-
functions in the script so as to see how it would affect performance).
|
|
161
|
-
|
|
162
|
-
Usage
|
|
163
|
-
-----
|
|
164
|
-
|
|
165
|
-
::
|
|
166
|
-
|
|
167
|
-
>>> import numpy as np
|
|
168
|
-
>>> import numexpr as ne
|
|
169
|
-
|
|
170
|
-
>>> a = np.arange(1e6) # Choose large arrays for better speedups
|
|
171
|
-
>>> b = np.arange(1e6)
|
|
172
|
-
|
|
173
|
-
>>> ne.evaluate("a + 1") # a simple expression
|
|
174
|
-
array([ 1.00000000e+00, 2.00000000e+00, 3.00000000e+00, ...,
|
|
175
|
-
9.99998000e+05, 9.99999000e+05, 1.00000000e+06])
|
|
176
|
-
|
|
177
|
-
>>> ne.evaluate("a * b - 4.1 * a > 2.5 * b") # a more complex one
|
|
178
|
-
array([False, False, False, ..., True, True, True], dtype=bool)
|
|
179
|
-
|
|
180
|
-
>>> ne.evaluate("sin(a) + arcsinh(a/b)") # you can also use functions
|
|
181
|
-
array([ NaN, 1.72284457, 1.79067101, ..., 1.09567006,
|
|
182
|
-
0.17523598, -0.09597844])
|
|
183
|
-
|
|
184
|
-
>>> s = np.array([b'abba', b'abbb', b'abbcdef'])
|
|
185
|
-
>>> ne.evaluate("b'abba' == s") # string arrays are supported too
|
|
186
|
-
array([ True, False, False], dtype=bool)
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
Documentation
|
|
190
|
-
-------------
|
|
191
|
-
|
|
192
|
-
Please see the official documentation at `numexpr.readthedocs.io <https://numexpr.readthedocs.io>`_.
|
|
193
|
-
Included is a user guide, benchmark results, and the reference API.
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
Authors
|
|
197
|
-
-------
|
|
198
|
-
|
|
199
|
-
Please see `AUTHORS.txt <https://github.com/pydata/numexpr/blob/master/AUTHORS.txt>`_.
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
License
|
|
203
|
-
-------
|
|
204
|
-
|
|
205
|
-
NumExpr is distributed under the `MIT <http://www.opensource.org/licenses/mit-license.php>`_ license.
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
.. Local Variables:
|
|
209
|
-
.. mode: text
|
|
210
|
-
.. coding: utf-8
|
|
211
|
-
.. fill-column: 70
|
|
212
|
-
.. End:
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
numpy>=1.19.3
|
numexpr-2.10.0/pyproject.toml
DELETED
numexpr-2.10.0/requirements.txt
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
numpy >= 1.19.3 # keep in sync with NPY_TARGET_VERSION (setup.py)
|
numexpr-2.10.0/setup.cfg
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
[metadata]
|
|
2
|
-
name = numexpr
|
|
3
|
-
version = 2.10.0
|
|
4
|
-
description = Fast numerical expression evaluator for NumPy
|
|
5
|
-
author = David M. Cooke, Francesc Alted, and others
|
|
6
|
-
maintainer = Francesc Alted
|
|
7
|
-
maintainer_email = faltet@gmail.com
|
|
8
|
-
url = https://github.com/pydata/numexpr
|
|
9
|
-
long_description = file: README.rst
|
|
10
|
-
long_description_content_type = text/x-rst
|
|
11
|
-
license = MIT
|
|
12
|
-
classifiers =
|
|
13
|
-
Development Status :: 6 - Mature
|
|
14
|
-
Intended Audience :: Financial and Insurance Industry
|
|
15
|
-
Intended Audience :: Science/Research
|
|
16
|
-
License :: OSI Approved :: MIT License
|
|
17
|
-
Programming Language :: Python :: 3
|
|
18
|
-
Programming Language :: Python :: 3.9
|
|
19
|
-
Programming Language :: Python :: 3.10
|
|
20
|
-
Programming Language :: Python :: 3.11
|
|
21
|
-
Programming Language :: Python :: 3.12
|
|
22
|
-
Operating System :: Microsoft :: Windows
|
|
23
|
-
Operating System :: POSIX
|
|
24
|
-
Operating System :: MacOS
|
|
25
|
-
|
|
26
|
-
[options]
|
|
27
|
-
zip_safe = False
|
|
28
|
-
packages = find:
|
|
29
|
-
python_requires = >=3.9
|
|
30
|
-
|
|
31
|
-
[egg_info]
|
|
32
|
-
tag_build =
|
|
33
|
-
tag_date = 0
|
|
34
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|