summaryrefslogtreecommitdiff
path: root/numpy/lib/mixins.pyi
diff options
context:
space:
mode:
authorBas van Beek <b.f.van.beek@vu.nl>2021-04-25 14:17:42 +0200
committerBas van Beek <b.f.van.beek@vu.nl>2021-04-26 16:41:04 +0200
commitbb34344242097b95db2be2e938c0ce14db225db3 (patch)
tree66924ba276a0d8e3613c75c1dcde29936a6fa79f /numpy/lib/mixins.pyi
parent775d243be65f36564580ed5fcf038f384c61ce4d (diff)
downloadnumpy-bb34344242097b95db2be2e938c0ce14db225db3.tar.gz
ENH: Add improved placeholder annotations for `np.lib`
Diffstat (limited to 'numpy/lib/mixins.pyi')
-rw-r--r--numpy/lib/mixins.pyi62
1 files changed, 62 insertions, 0 deletions
diff --git a/numpy/lib/mixins.pyi b/numpy/lib/mixins.pyi
new file mode 100644
index 000000000..4763a0710
--- /dev/null
+++ b/numpy/lib/mixins.pyi
@@ -0,0 +1,62 @@
+from typing import List
+from abc import ABCMeta, abstractmethod
+
+__all__: List[str]
+
+# NOTE: `NDArrayOperatorsMixin` is not formally an abstract baseclass,
+# even though it's relient on subclasses implementing `__array_ufunc__`
+
+class NDArrayOperatorsMixin(metaclass=ABCMeta):
+ @abstractmethod
+ def __array_ufunc__(self, ufunc, method, *inputs, **kwargs): ...
+ def __lt__(self, other): ...
+ def __le__(self, other): ...
+ def __eq__(self, other): ...
+ def __ne__(self, other): ...
+ def __gt__(self, other): ...
+ def __ge__(self, other): ...
+ def __add__(self, other): ...
+ def __radd__(self, other): ...
+ def __iadd__(self, other): ...
+ def __sub__(self, other): ...
+ def __rsub__(self, other): ...
+ def __isub__(self, other): ...
+ def __mul__(self, other): ...
+ def __rmul__(self, other): ...
+ def __imul__(self, other): ...
+ def __matmul__(self, other): ...
+ def __rmatmul__(self, other): ...
+ def __imatmul__(self, other): ...
+ def __truediv__(self, other): ...
+ def __rtruediv__(self, other): ...
+ def __itruediv__(self, other): ...
+ def __floordiv__(self, other): ...
+ def __rfloordiv__(self, other): ...
+ def __ifloordiv__(self, other): ...
+ def __mod__(self, other): ...
+ def __rmod__(self, other): ...
+ def __imod__(self, other): ...
+ def __divmod__(self, other): ...
+ def __rdivmod__(self, other): ...
+ def __pow__(self, other): ...
+ def __rpow__(self, other): ...
+ def __ipow__(self, other): ...
+ def __lshift__(self, other): ...
+ def __rlshift__(self, other): ...
+ def __ilshift__(self, other): ...
+ def __rshift__(self, other): ...
+ def __rrshift__(self, other): ...
+ def __irshift__(self, other): ...
+ def __and__(self, other): ...
+ def __rand__(self, other): ...
+ def __iand__(self, other): ...
+ def __xor__(self, other): ...
+ def __rxor__(self, other): ...
+ def __ixor__(self, other): ...
+ def __or__(self, other): ...
+ def __ror__(self, other): ...
+ def __ior__(self, other): ...
+ def __neg__(self): ...
+ def __pos__(self): ...
+ def __abs__(self): ...
+ def __invert__(self): ...