numexpr icon indicating copy to clipboard operation
numexpr copied to clipboard

ENH: You can now drop `NPY_MAXARGS` starting with `NPY_2_3_API_VERSION`

Open seberg opened this issue 11 months ago • 3 comments

As promised, you can now [1] do a runtime check for PyArray_RUNTIME_VERSION >= NPY_2_3_API_VERSION. If this is the case, NPY_MAXARGS is irrelevant (integer number of operands supported). NumPy always raised an error for you on older versions, but I suppose it may make sense to keep the check to make that error clearer.

Of course, NE_MAXARGS is still used for numexpr internal stack allocations. That could be arbitrarily bumped or refactored away now.

[1] Well, may want to wait a few days for the next nightly (the version macro is also slightly off).

seberg avatar Jan 07 '25 16:01 seberg