numexpr 2.12.0__tar.gz → 2.12.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.
Files changed (60) hide show
  1. {numexpr-2.12.0 → numexpr-2.12.1}/ADDFUNCS.rst +19 -0
  2. {numexpr-2.12.0 → numexpr-2.12.1}/ANNOUNCE.rst +10 -12
  3. {numexpr-2.12.0 → numexpr-2.12.1}/PKG-INFO +2 -2
  4. {numexpr-2.12.0 → numexpr-2.12.1}/README.rst +1 -1
  5. {numexpr-2.12.0 → numexpr-2.12.1}/RELEASE_NOTES.rst +13 -0
  6. numexpr-2.12.1/VERSION +1 -0
  7. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/complex_functions.hpp +29 -0
  8. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/functions.hpp +14 -0
  9. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/interp_body.cpp +11 -0
  10. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/interpreter.cpp +99 -1
  11. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/interpreter.hpp +6 -0
  12. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/module.cpp +2 -0
  13. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/opcodes.hpp +27 -26
  14. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/tests/test_numexpr.py +5 -0
  15. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/version.py +2 -2
  16. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr.egg-info/PKG-INFO +2 -2
  17. {numexpr-2.12.0 → numexpr-2.12.1}/site.cfg.example +5 -3
  18. numexpr-2.12.0/VERSION +0 -1
  19. {numexpr-2.12.0 → numexpr-2.12.1}/AUTHORS.txt +0 -0
  20. {numexpr-2.12.0 → numexpr-2.12.1}/LICENSE.txt +0 -0
  21. {numexpr-2.12.0 → numexpr-2.12.1}/LICENSES/cpuinfo.txt +0 -0
  22. {numexpr-2.12.0 → numexpr-2.12.1}/MANIFEST.in +0 -0
  23. {numexpr-2.12.0 → numexpr-2.12.1}/bench/boolean_timing.py +0 -0
  24. {numexpr-2.12.0 → numexpr-2.12.1}/bench/free_threading.py +0 -0
  25. {numexpr-2.12.0 → numexpr-2.12.1}/bench/issue-36.py +0 -0
  26. {numexpr-2.12.0 → numexpr-2.12.1}/bench/issue-47.py +0 -0
  27. {numexpr-2.12.0 → numexpr-2.12.1}/bench/large_array_vs_numpy.py +0 -0
  28. {numexpr-2.12.0 → numexpr-2.12.1}/bench/multidim.py +0 -0
  29. {numexpr-2.12.0 → numexpr-2.12.1}/bench/poly.py +0 -0
  30. {numexpr-2.12.0 → numexpr-2.12.1}/bench/timing.py +0 -0
  31. {numexpr-2.12.0 → numexpr-2.12.1}/bench/unaligned-simple.py +0 -0
  32. {numexpr-2.12.0 → numexpr-2.12.1}/bench/varying-expr.py +0 -0
  33. {numexpr-2.12.0 → numexpr-2.12.1}/bench/vml_timing.py +0 -0
  34. {numexpr-2.12.0 → numexpr-2.12.1}/bench/vml_timing2.py +0 -0
  35. {numexpr-2.12.0 → numexpr-2.12.1}/bench/vml_timing3.py +0 -0
  36. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/__init__.py +0 -0
  37. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/cpuinfo.py +0 -0
  38. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/expressions.py +0 -0
  39. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/missing_posix_functions.hpp +0 -0
  40. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/module.hpp +0 -0
  41. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/msvc_function_stubs.hpp +0 -0
  42. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/necompiler.py +0 -0
  43. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/numexpr_config.hpp +0 -0
  44. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/numexpr_object.cpp +0 -0
  45. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/numexpr_object.hpp +0 -0
  46. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/str-two-way.hpp +0 -0
  47. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/tests/__init__.py +0 -0
  48. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/tests/conftest.py +0 -0
  49. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/utils.py +0 -0
  50. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/win32/pthread.c +0 -0
  51. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/win32/pthread.h +0 -0
  52. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr/win32/stdint.h +0 -0
  53. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr.egg-info/SOURCES.txt +0 -0
  54. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr.egg-info/dependency_links.txt +0 -0
  55. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr.egg-info/requires.txt +0 -0
  56. {numexpr-2.12.0 → numexpr-2.12.1}/numexpr.egg-info/top_level.txt +0 -0
  57. {numexpr-2.12.0 → numexpr-2.12.1}/pyproject.toml +0 -0
  58. {numexpr-2.12.0 → numexpr-2.12.1}/requirements.txt +0 -0
  59. {numexpr-2.12.0 → numexpr-2.12.1}/setup.cfg +0 -0
  60. {numexpr-2.12.0 → numexpr-2.12.1}/setup.py +0 -0
@@ -171,6 +171,23 @@ Add clauses to generate the FUNC_CODES from the ``functions.hpp`` header, making
171
171
  };
172
172
  #endif
173
173
 
174
+ Some functions (e.g. ``fmod``, ``isnan``) are not available in MKL, and so must be hard-coded here as well:
175
+
176
+ .. code-block:: cpp
177
+
178
+ #ifdef USE_VML
179
+ /* no isnan, isfinite or isinf in VML */
180
+ static void vdIsfinite(MKL_INT n, const double* x1, bool* dest)
181
+ {
182
+ MKL_INT j;
183
+ for (j=0; j<n; j++) {
184
+ dest[j] = isfinited(x1[j]);
185
+ };
186
+ };
187
+ #endif
188
+
189
+ The complex case is slightlñy different (see other examples in the same file).
190
+
174
191
  Add case handling to the ``check_program`` function
175
192
 
176
193
  .. code-block:: cpp
@@ -219,4 +236,6 @@ In many cases this process will not be very smooth since one relies on the inter
219
236
 
220
237
  * Depending on the new function signature (above all if the out type is different to the input types), one may have to edit the ``__init__`` function in the ``FuncNode`` class in ``expressions.py``.
221
238
 
239
+ * Functions which accept and/or return complex arguments must be added to the ``complex_functions.hpp`` file (take care when adding them in ``interpreter.cpp`` and ``interp_body.cpp``, since their signatures are usually a bit different).
240
+
222
241
  * Depending on MSVC support, namespace clashes, casting problems, it may be necessary to make various changes to ``numexpr/numexpr_config.hpp`` and ``numexpr/msvc_function_stubs.hpp``. For example, in PR #523, non-clashing wrappers were introduced for ``isnan`` and ``isfinite`` since the float versions ``isnanf, isfinitef`` were inconsistently defined (and output ints) - depending on how strict the platform interpreter is, the implicit cast from int to bool was acceptable or not for example. In addition, the base functions were in different namespaces or had different names across platforms.
@@ -1,29 +1,27 @@
1
1
  =========================
2
- Announcing NumExpr 2.12.0
2
+ Announcing NumExpr 2.12.1
3
3
  =========================
4
4
 
5
5
  Hi everyone,
6
6
 
7
- NumExpr 2.12.0 comes with new isnan/isfinite/isinf functions.
8
- Most importantly, we have added instructions for adding new functions
9
- to the virtual machine. See ADDFUNCS.rst for more details. Thanks to
10
- Luke Shaw for these contributions.
7
+ NumExpr 2.12.1 allows isnan/isfinite/isinf functions to be used with complex.
8
+ Also, OneAPI MKL has been fixed. Thanks to Luke Shaw for these contributions.
11
9
 
12
10
  Project documentation is available at:
13
11
 
14
12
  http://numexpr.readthedocs.io/
15
13
 
16
- Changes from 2.11.0 to 2.12.0
14
+ Changes from 2.12.0 to 2.12.1
17
15
  -----------------------------
18
16
 
19
- * Added isnan/isfinite/isinf functions. Thanks to Luke Shaw.
17
+ * Added complex counterparts for isnan/isfinite/isinf functions.
18
+ Thanks to Luke Shaw.
20
19
 
21
- * New instructions for adding new functions to the virtual machine.
22
- They are available at ADDFUNCS.rst. Thanks to Luke Shaw.
20
+ * Updated documentation for the new functions and instructions
21
+ for adding new functions to the virtual machine. Thanks to Luke Shaw.
23
22
 
24
- * We are distributing binary wheels for Python 3.14 and 3.14t now.
25
-
26
- * We are distributing musllinux wheels too! Thanks to Clément Robert.
23
+ * Fixed MKL support; it was broken in 2.12.0. Thanks to
24
+ Christoph Gohlke for reporting the issue.
27
25
 
28
26
  What's Numexpr?
29
27
  ---------------
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: numexpr
3
- Version: 2.12.0
3
+ Version: 2.12.1
4
4
  Summary: Fast numerical expression evaluator for NumPy
5
5
  Author-email: "David M. Cooke, Francesc Alted, and others" <blosc@blosc.org>
6
6
  Maintainer-email: Blosc Development Team <blosc@blosc.org>
@@ -137,7 +137,7 @@ See `requirements.txt` for the required version of NumPy.
137
137
 
138
138
  NumExpr is built in the standard Python way::
139
139
 
140
- python setup.py build install
140
+ pip install [-e] .
141
141
 
142
142
  You can test `numexpr` with::
143
143
 
@@ -106,7 +106,7 @@ See `requirements.txt` for the required version of NumPy.
106
106
 
107
107
  NumExpr is built in the standard Python way::
108
108
 
109
- python setup.py build install
109
+ pip install [-e] .
110
110
 
111
111
  You can test `numexpr` with::
112
112
 
@@ -2,6 +2,19 @@
2
2
  Release notes for NumExpr 2.12 series
3
3
  =====================================
4
4
 
5
+ Changes from 2.12.0 to 2.12.1
6
+ -----------------------------
7
+
8
+ * Added complex counterparts for isnan/isfinite/isinf functions.
9
+ Thanks to Luke Shaw.
10
+
11
+ * Updated documentation for the new functions and instructions
12
+ for adding new functions to the virtual machine. Thanks to Luke Shaw.
13
+
14
+ * Fixed MKL support; it was broken in 2.12.0. Thanks to
15
+ Christoph Gohlke for reporting the issue.
16
+
17
+
5
18
  Changes from 2.11.0 to 2.12.0
6
19
  -----------------------------
7
20
 
numexpr-2.12.1/VERSION ADDED
@@ -0,0 +1 @@
1
+ 2.12.1
@@ -424,4 +424,33 @@ nc_abs(std::complex<double> *x, std::complex<double> *r)
424
424
  r->imag(0);
425
425
  }
426
426
 
427
+ static bool
428
+ nc_isinf(std::complex<double> *x)
429
+ {
430
+ double xr=x->real(), xi=x->imag();
431
+ bool bi,br;
432
+ bi = isinfd(xi);
433
+ br = isinfd(xr);
434
+ return bi || br;
435
+ }
436
+
437
+ static bool
438
+ nc_isnan(std::complex<double> *x)
439
+ {
440
+ double xr=x->real(), xi=x->imag();
441
+ bool bi,br;
442
+ bi = isnand(xi);
443
+ br = isnand(xr);
444
+ return bi || br;
445
+ }
446
+
447
+ static bool
448
+ nc_isfinite(std::complex<double> *x)
449
+ {
450
+ double xr=x->real(), xi=x->imag();
451
+ bool bi,br;
452
+ bi = isfinited(xi);
453
+ br = isfinited(xr);
454
+ return bi && br;
455
+ }
427
456
  #endif // NUMEXPR_COMPLEX_FUNCTIONS_HPP
@@ -166,3 +166,17 @@ FUNC_CCC(FUNC_CCC_LAST, NULL, NULL)
166
166
  #undef ELIDE_FUNC_CCC
167
167
  #undef FUNC_CCC
168
168
  #endif
169
+
170
+ // complex -> boolean functions
171
+ #ifndef FUNC_BC
172
+ #define ELIDE_FUNC_BC
173
+ #define FUNC_BC(...)
174
+ #endif // use wrappers as there is name collision with isnanf in std
175
+ FUNC_BC(FUNC_ISNAN_BC, "isnan_bc", nc_isnan, vzIsnan)
176
+ FUNC_BC(FUNC_ISFINITE_BC, "isfinite_bc", nc_isfinite, vzIsfinite)
177
+ FUNC_BC(FUNC_ISINF_BC, "isinf_bc", nc_isinf, vzIsinf)
178
+ FUNC_BC(FUNC_BC_LAST, NULL, NULL, NULL)
179
+ #ifdef ELIDE_FUNC_BC
180
+ #undef ELIDE_FUNC_BC
181
+ #undef FUNC_BC
182
+ #endif
@@ -469,6 +469,17 @@
469
469
  VEC_ARG1(b_dest = functions_bd[arg2](d1));
470
470
  #endif
471
471
 
472
+ case OP_FUNC_BCN:
473
+ #ifdef USE_VML
474
+ VEC_ARG1_VML(functions_bc_vml[arg2](BLOCK_SIZE,
475
+ (const MKL_Complex16*)x1, (bool*)dest));
476
+ #else
477
+ VEC_ARG1(ca.real(c1r);
478
+ ca.imag(c1i);
479
+ b_dest = functions_bc[arg2](&ca));
480
+ #endif
481
+
482
+
472
483
  /* Reductions */
473
484
  case OP_SUM_IIN: VEC_ARG1(i_reduce += i1);
474
485
  case OP_SUM_LLN: VEC_ARG1(l_reduce += l1);
@@ -220,6 +220,31 @@ FuncBFPtr functions_bf[] = {
220
220
  };
221
221
  #endif
222
222
 
223
+ #ifdef USE_VML
224
+ /* no isnan, isfinite or isinf in VML */
225
+ static void vfIsfinite(MKL_INT n, const float* x1, bool* dest)
226
+ {
227
+ MKL_INT j;
228
+ for (j=0; j<n; j++) {
229
+ dest[j] = isfinitef_(x1[j]);
230
+ };
231
+ };
232
+ static void vfIsinf(MKL_INT n, const float* x1, bool* dest)
233
+ {
234
+ MKL_INT j;
235
+ for (j=0; j<n; j++) {
236
+ dest[j] = isinff_(x1[j]);
237
+ };
238
+ };
239
+ static void vfIsnan(MKL_INT n, const float* x1, bool* dest)
240
+ {
241
+ MKL_INT j;
242
+ for (j=0; j<n; j++) {
243
+ dest[j] = isnanf_(x1[j]);
244
+ };
245
+ };
246
+ #endif
247
+
223
248
  #ifdef USE_VML
224
249
  typedef void (*FuncBFPtr_vml)(MKL_INT, const float*, bool*);
225
250
  FuncBFPtr_vml functions_bf_vml[] = {
@@ -236,6 +261,31 @@ FuncBDPtr functions_bd[] = {
236
261
  #undef FUNC_BD
237
262
  };
238
263
 
264
+ #ifdef USE_VML
265
+ /* no isnan, isfinite or isinf in VML */
266
+ static void vdIsfinite(MKL_INT n, const double* x1, bool* dest)
267
+ {
268
+ MKL_INT j;
269
+ for (j=0; j<n; j++) {
270
+ dest[j] = isfinited(x1[j]);
271
+ };
272
+ };
273
+ static void vdIsinf(MKL_INT n, const double* x1, bool* dest)
274
+ {
275
+ MKL_INT j;
276
+ for (j=0; j<n; j++) {
277
+ dest[j] = isinfd(x1[j]);
278
+ };
279
+ };
280
+ static void vdIsnan(MKL_INT n, const double* x1, bool* dest)
281
+ {
282
+ MKL_INT j;
283
+ for (j=0; j<n; j++) {
284
+ dest[j] = isnand(x1[j]);
285
+ };
286
+ };
287
+ #endif
288
+
239
289
  #ifdef USE_VML
240
290
  typedef void (*FuncBDPtr_vml)(MKL_INT, const double*, bool*);
241
291
  FuncBDPtr_vml functions_bd_vml[] = {
@@ -245,6 +295,47 @@ FuncBDPtr_vml functions_bd_vml[] = {
245
295
  };
246
296
  #endif
247
297
 
298
+ typedef bool (*FuncBCPtr)(std::complex<double>*);
299
+ FuncBCPtr functions_bc[] = {
300
+ #define FUNC_BC(fop, s, f, ...) f,
301
+ #include "functions.hpp"
302
+ #undef FUNC_BC
303
+ };
304
+
305
+ #ifdef USE_VML
306
+ /* no isnan, isfinite or isinf in VML */
307
+ static void vzIsfinite(MKL_INT n, const MKL_Complex16* x1, bool* dest)
308
+ {
309
+ MKL_INT j;
310
+ for (j=0; j<n; j++) {
311
+ dest[j] = isfinited(x1[j].real) && isfinited(x1[j].imag);
312
+ };
313
+ };
314
+ static void vzIsinf(MKL_INT n, const MKL_Complex16* x1, bool* dest)
315
+ {
316
+ MKL_INT j;
317
+ for (j=0; j<n; j++) {
318
+ dest[j] = isinfd(x1[j].real) || isinfd(x1[j].imag);
319
+ };
320
+ };
321
+ static void vzIsnan(MKL_INT n, const MKL_Complex16* x1, bool* dest)
322
+ {
323
+ MKL_INT j;
324
+ for (j=0; j<n; j++) {
325
+ dest[j] = isnand(x1[j].real) || isnand(x1[j].imag);
326
+ };
327
+ };
328
+ #endif
329
+
330
+ #ifdef USE_VML
331
+ typedef void (*FuncBCPtr_vml)(MKL_INT, const MKL_Complex16[], bool*);
332
+ FuncBCPtr_vml functions_bc_vml[] = {
333
+ #define FUNC_BC(fop, s, f, f_vml) f_vml,
334
+ #include "functions.hpp"
335
+ #undef FUNC_BC
336
+ };
337
+ #endif
338
+
248
339
  #ifdef USE_VML
249
340
  /* Fake vdConj function just for casting purposes inside numexpr */
250
341
  static void vdConj(MKL_INT n, const double* x1, double* dest)
@@ -517,7 +608,14 @@ check_program(NumExprObject *self)
517
608
  PyErr_Format(PyExc_RuntimeError, "invalid program: funccode out of range (%i) at %i", arg, argloc);
518
609
  return -1;
519
610
  }
520
- } else if (op >= OP_REDUCTION) {
611
+ }
612
+ else if (op == OP_FUNC_BCN) {
613
+ if (arg < 0 || arg >= FUNC_BC_LAST) {
614
+ PyErr_Format(PyExc_RuntimeError, "invalid program: funccode out of range (%i) at %i", arg, argloc);
615
+ return -1;
616
+ }
617
+ }
618
+ else if (op >= OP_REDUCTION) {
521
619
  ;
522
620
  } else {
523
621
  PyErr_Format(PyExc_RuntimeError, "invalid program: internal checker error processing %i", argloc);
@@ -42,6 +42,12 @@ enum FuncBDCodes {
42
42
  #undef FUNC_BD
43
43
  };
44
44
 
45
+ enum FuncBCCodes {
46
+ #define FUNC_BC(fop, ...) fop,
47
+ #include "functions.hpp"
48
+ #undef FUNC_BC
49
+ };
50
+
45
51
  enum FuncDDDCodes {
46
52
  #define FUNC_DDD(fop, ...) fop,
47
53
  #include "functions.hpp"
@@ -508,6 +508,7 @@ PyInit_interpreter(void) {
508
508
  #define FUNC_DD(name, sname, ...) add_func(name, sname);
509
509
  #define FUNC_BF(name, sname, ...) add_func(name, sname);
510
510
  #define FUNC_BD(name, sname, ...) add_func(name, sname);
511
+ #define FUNC_BC(name, sname, ...) add_func(name, sname);
511
512
  #define FUNC_DDD(name, sname, ...) add_func(name, sname);
512
513
  #define FUNC_CC(name, sname, ...) add_func(name, sname);
513
514
  #define FUNC_CCC(name, sname, ...) add_func(name, sname);
@@ -515,6 +516,7 @@ PyInit_interpreter(void) {
515
516
  #undef FUNC_CCC
516
517
  #undef FUNC_CC
517
518
  #undef FUNC_DDD
519
+ #undef FUNC_BC
518
520
  #undef FUNC_BD
519
521
  #undef FUNC_BF
520
522
  #undef FUNC_DD
@@ -150,38 +150,39 @@ OPCODE(105, OP_CONTAINS_BSS, "contains_bss", Tb, Ts, Ts, T0)
150
150
  //Boolean outputs
151
151
  OPCODE(106, OP_FUNC_BDN, "func_bdn", Tb, Td, Tn, T0)
152
152
  OPCODE(107, OP_FUNC_BFN, "func_bfn", Tb, Tf, Tn, T0)
153
+ OPCODE(108, OP_FUNC_BCN, "func_bcn", Tb, Tc, Tn, T0)
153
154
 
154
155
  // Reductions always have to be at the end - parts of the code
155
156
  // use > OP_REDUCTION to decide whether operation is a reduction
156
- OPCODE(108, OP_REDUCTION, NULL, T0, T0, T0, T0)
157
+ OPCODE(109, OP_REDUCTION, NULL, T0, T0, T0, T0)
157
158
 
158
159
  /* Last argument in a reduction is the axis of the array the
159
160
  reduction should be applied along. */
160
161
 
161
- OPCODE(109, OP_SUM_IIN, "sum_iin", Ti, Ti, Tn, T0)
162
- OPCODE(110, OP_SUM_LLN, "sum_lln", Tl, Tl, Tn, T0)
163
- OPCODE(111, OP_SUM_FFN, "sum_ffn", Tf, Tf, Tn, T0)
164
- OPCODE(112, OP_SUM_DDN, "sum_ddn", Td, Td, Tn, T0)
165
- OPCODE(113, OP_SUM_CCN, "sum_ccn", Tc, Tc, Tn, T0)
166
-
167
- OPCODE(114, OP_PROD, NULL, T0, T0, T0, T0)
168
- OPCODE(115, OP_PROD_IIN, "prod_iin", Ti, Ti, Tn, T0)
169
- OPCODE(116, OP_PROD_LLN, "prod_lln", Tl, Tl, Tn, T0)
170
- OPCODE(117, OP_PROD_FFN, "prod_ffn", Tf, Tf, Tn, T0)
171
- OPCODE(118, OP_PROD_DDN, "prod_ddn", Td, Td, Tn, T0)
172
- OPCODE(119, OP_PROD_CCN, "prod_ccn", Tc, Tc, Tn, T0)
173
-
174
- OPCODE(120, OP_MIN, NULL, T0, T0, T0, T0)
175
- OPCODE(121, OP_MIN_IIN, "min_iin", Ti, Ti, Tn, T0)
176
- OPCODE(122, OP_MIN_LLN, "min_lln", Tl, Tl, Tn, T0)
177
- OPCODE(123, OP_MIN_FFN, "min_ffn", Tf, Tf, Tn, T0)
178
- OPCODE(124, OP_MIN_DDN, "min_ddn", Td, Td, Tn, T0)
179
-
180
- OPCODE(125, OP_MAX, NULL, T0, T0, T0, T0)
181
- OPCODE(126, OP_MAX_IIN, "max_iin", Ti, Ti, Tn, T0)
182
- OPCODE(127, OP_MAX_LLN, "max_lln", Tl, Tl, Tn, T0)
183
- OPCODE(128, OP_MAX_FFN, "max_ffn", Tf, Tf, Tn, T0)
184
- OPCODE(129, OP_MAX_DDN, "max_ddn", Td, Td, Tn, T0)
162
+ OPCODE(110, OP_SUM_IIN, "sum_iin", Ti, Ti, Tn, T0)
163
+ OPCODE(111, OP_SUM_LLN, "sum_lln", Tl, Tl, Tn, T0)
164
+ OPCODE(112, OP_SUM_FFN, "sum_ffn", Tf, Tf, Tn, T0)
165
+ OPCODE(113, OP_SUM_DDN, "sum_ddn", Td, Td, Tn, T0)
166
+ OPCODE(114, OP_SUM_CCN, "sum_ccn", Tc, Tc, Tn, T0)
167
+
168
+ OPCODE(115, OP_PROD, NULL, T0, T0, T0, T0)
169
+ OPCODE(116, OP_PROD_IIN, "prod_iin", Ti, Ti, Tn, T0)
170
+ OPCODE(117, OP_PROD_LLN, "prod_lln", Tl, Tl, Tn, T0)
171
+ OPCODE(118, OP_PROD_FFN, "prod_ffn", Tf, Tf, Tn, T0)
172
+ OPCODE(119, OP_PROD_DDN, "prod_ddn", Td, Td, Tn, T0)
173
+ OPCODE(120, OP_PROD_CCN, "prod_ccn", Tc, Tc, Tn, T0)
174
+
175
+ OPCODE(121, OP_MIN, NULL, T0, T0, T0, T0)
176
+ OPCODE(122, OP_MIN_IIN, "min_iin", Ti, Ti, Tn, T0)
177
+ OPCODE(123, OP_MIN_LLN, "min_lln", Tl, Tl, Tn, T0)
178
+ OPCODE(124, OP_MIN_FFN, "min_ffn", Tf, Tf, Tn, T0)
179
+ OPCODE(125, OP_MIN_DDN, "min_ddn", Td, Td, Tn, T0)
180
+
181
+ OPCODE(126, OP_MAX, NULL, T0, T0, T0, T0)
182
+ OPCODE(127, OP_MAX_IIN, "max_iin", Ti, Ti, Tn, T0)
183
+ OPCODE(128, OP_MAX_LLN, "max_lln", Tl, Tl, Tn, T0)
184
+ OPCODE(129, OP_MAX_FFN, "max_ffn", Tf, Tf, Tn, T0)
185
+ OPCODE(130, OP_MAX_DDN, "max_ddn", Td, Td, Tn, T0)
185
186
 
186
187
  /*
187
188
  When we get to 255, will maybe have to change code again
@@ -189,4 +190,4 @@ When we get to 255, will maybe have to change code again
189
190
  other than unsigned char for OPCODE table)
190
191
  */
191
192
  /* Should be the last opcode */
192
- OPCODE(130, OP_END, NULL, T0, T0, T0, T0)
193
+ OPCODE(131, OP_END, NULL, T0, T0, T0, T0)
@@ -709,6 +709,11 @@ class test_evaluate(TestCase):
709
709
  assert np.all(evaluate("isnan(a)") == np.isnan(a))
710
710
  assert np.all(evaluate("isfinite(a)") == np.isfinite(a))
711
711
  assert np.all(evaluate("isinf(a)") == np.isinf(a))
712
+ a = a.astype(np.complex128)
713
+ assert a.dtype == np.complex128
714
+ assert np.all(evaluate("isnan(a)") == np.isnan(a))
715
+ assert np.all(evaluate("isfinite(a)") == np.isfinite(a))
716
+ assert np.all(evaluate("isinf(a)") == np.isinf(a))
712
717
 
713
718
  if 'sparc' not in platform.machine():
714
719
  # Execution order set here so as to not use too many threads
@@ -1,5 +1,5 @@
1
1
  # THIS FILE IS GENERATED BY `setup.py`
2
- __version__ = '2.12.0'
3
- version = '2.12.0'
2
+ __version__ = '2.12.1'
3
+ version = '2.12.1'
4
4
  numpy_build_version = '2.3.3'
5
5
  platform_machine = 'AMD64'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: numexpr
3
- Version: 2.12.0
3
+ Version: 2.12.1
4
4
  Summary: Fast numerical expression evaluator for NumPy
5
5
  Author-email: "David M. Cooke, Francesc Alted, and others" <blosc@blosc.org>
6
6
  Maintainer-email: Blosc Development Team <blosc@blosc.org>
@@ -137,7 +137,7 @@ See `requirements.txt` for the required version of NumPy.
137
137
 
138
138
  NumExpr is built in the standard Python way::
139
139
 
140
- python setup.py build install
140
+ pip install [-e] .
141
141
 
142
142
  You can test `numexpr` with::
143
143
 
@@ -2,10 +2,12 @@
2
2
  # file to "site.cfg" and edit the paths according to your installation of the
3
3
  # Intel MKL.
4
4
 
5
- # Example for Intel(R) MKL 2018 on Linux
5
+ # Example for Intel(R) OneAPI MKL 2025 on Linux
6
+ # When compiling (with e.g. `pip install -e. -v`), first do a:
7
+ # $ source /opt/intel/oneapi/setvars.sh >/dev/null 2>&1 || true
6
8
  # [mkl]
7
- # library_dirs = /opt/intel/compilers_and_libraries_2018/linux/mkl/lib/intel64
8
- # include_dirs = /opt/intel/compilers_and_libraries_2018/linux/mkl/include
9
+ # include_dirs = /opt/intel/oneapi/mkl/latest/include
10
+ # library_dirs = /opt/intel/oneapi/mkl/latest/lib/intel64
9
11
  # libraries = mkl_rt
10
12
 
11
13
 
numexpr-2.12.0/VERSION DELETED
@@ -1 +0,0 @@
1
- 2.12.0
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