-
-
Notifications
You must be signed in to change notification settings - Fork 12k
Closed as not planned
Closed as not planned
Copy link
Description
As a follow up on #8247, I would like to write another backwards compatible mixin class like NDArrayOperatorsMixin suitable for vendoring in third-party libraries such as xarray and dask (and maybe pandas) that want to support __array_ufunc__ but aren't yet willing to require NumPy v1.13.
My intended usage pattern is as a drop-in replacement:
try:
from numpy.lib.mixins import NDArrayOperatorsMixin
except ImportError:
from my_library.legacy_numpy_compat import NDArrayOperatorsMixin
class MyArray(NDArrayOperatorsMixin):
def __numpy_ufunc__(self, ufunc, method, *inputs, **kwargs):
...
For simplicity and ease of use (not to mention decoupling from the NumPy release cycle), I think this should be a separate repository (e.g., "legacy-ndarray-operators-mixin") in the numpy github organization. I'm happy to help put this together, but wanted to make sure this makes sense to others first.
Metadata
Metadata
Assignees
Labels
No labels