are we allowed to add new functionality like "isnotnan"
users often call "~np.isnan(arr)" this makes TWO passes and produces a temporary array in the process. Are we allowed to add "isnotnan" then the user can call np.isnotnan(arr).
For instance let's say the final module name is "pnumpy" for parallel numpy.
import pnumpy as pn
pn.isnotnan(arr)
is this project allowed to add new routines like isnotnan that the core numpy code may eventually take?
This is up to the project. We should likely not do that too often, but if it is justified and we believe a case could be made to the NumPy community that they should accept the new function into NumPy, then I don't see why not.
NumPy is only likely to accept new functionality that matches the array api spec.
I would suggest adding new functionality like this, which I think is in accordance with NEP 36:
- Add the functions in a separate namespace like
pnumpy._numpy_extendedso we can clearly document them as extensions - If we wish to upstream them to numpy, file an issue that clearly explains the use case and suggests the API used