Closed honno closed 1 year ago
Most of the functions in this module are just direct copies of the NumPy versions, i.e., we just do from numpy import *
and export np.sin
, np.exp
, etc. I'm only wrapping the functions that have changed behavior. Doing this would require wrapping every single function.
Additionally, we don't wrap or subclass the array object, so even if we fix it for functions, it wouldn't be fixed for operators.
Instead, I would just disable the warnings when testing this module. I don't know if it can be done with an environment variable.
The initial
numpy.array_api
PR https://github.com/numpy/numpy/pull/18585 had folks happy with keeping NumPy-proper's warnings when spec-compliant operations were being done (usually/always special case behaviour). Giving the flexibility of a separate package, could we instead suppress these warnings? Really my one use case here isarray-api-tests
, where right now our "daily driver" array module isnumpy.array_api
which deluges us with warnings that obfuscate other things... we could suppress them on our end tbf, just ugh.