diff options
author | Peter Hawkins <phawkins@google.com> | 2023-03-03 15:54:39 +0000 |
---|---|---|
committer | Peter Hawkins <phawkins@google.com> | 2023-03-03 15:54:39 +0000 |
commit | d4c7c1367a4ca36c0047cd6a4e8fb9273ee557b4 (patch) | |
tree | 3c18aa94267b41eadbcaadc471bb19dd4afa6cf2 | |
parent | 0f759540e8f6ac212bf5644666ec0b5b349960c0 (diff) | |
download | numpy-d4c7c1367a4ca36c0047cd6a4e8fb9273ee557b4.tar.gz |
Add type annotations for comparison operators to MaskedArray.
The comparison operators seem to be missing annotations; whereas pretty
much every other operator is annotated.
This causes pytype to conclude that the output of, say, __gt__ is a
regular ndarray, which isn't true.
-rw-r--r-- | numpy/ma/core.pyi | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/ma/core.pyi b/numpy/ma/core.pyi index 58d73a231..15f37c422 100644 --- a/numpy/ma/core.pyi +++ b/numpy/ma/core.pyi @@ -219,6 +219,10 @@ class MaskedArray(ndarray[_ShapeType, _DType_co]): def compress(self, condition, axis=..., out=...): ... def __eq__(self, other): ... def __ne__(self, other): ... + def __ge__(self, other): ... + def __gt__(self, other): ... + def __le__(self, other): ... + def __lt__(self, other): ... def __add__(self, other): ... def __radd__(self, other): ... def __sub__(self, other): ... |