Performs the operation __sub__.
(self: Array, other: Union[int, float, Array], /)
| 753 | self._array.__setitem__(key, asarray(value)._array) |
| 754 | |
| 755 | def __sub__(self: Array, other: Union[int, float, Array], /) -> Array: |
| 756 | """ |
| 757 | Performs the operation __sub__. |
| 758 | """ |
| 759 | other = self._check_allowed_dtypes(other, "numeric", "__sub__") |
| 760 | if other is NotImplemented: |
| 761 | return other |
| 762 | self, other = self._normalize_two_args(self, other) |
| 763 | res = self._array.__sub__(other._array) |
| 764 | return self.__class__._new(res) |
| 765 | |
| 766 | # PEP 484 requires int to be a subtype of float, but __truediv__ should |
| 767 | # not accept int. |
nothing calls this directly
no test coverage detected