-
-
Notifications
You must be signed in to change notification settings - Fork 218
Description
I bumped NPY_MAXARGS on NumPy main, however, it seems more useful to make NPY_MAXARGS a runtime constant, rather than a compile time one. So that it gives the correct value for both NumPy 1.x and 2.0 (unlike NPY_MAXDIMS, it is used too much for heap arrays).
This means numexpr needs to use a custom constant for the heap array allocations, but can keep using the operands+1 > NPY_MAXARGS check.
In principle it would be nice to have a operands+1 > NUMEXPR_MAXARGS check which maybe could warn (if you don't just remove the need for a compile time constant).
PS: I am open to bumping the constant further and hopefully removing it in the long term. Maybe you can just not rely on it at all anymore, but I am not sure what errors NumPy would raise if you removed it...