diff options
| author | Charles Harris <charlesr.harris@gmail.com> | 2021-10-09 14:35:58 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-09 14:35:58 -0600 |
| commit | a0d0805545af0b683e960486b7036064fea084a4 (patch) | |
| tree | 9b1a174123ca834d3472c82a563b4741ff35b11a /numpy | |
| parent | 83d8df9cdda474c51d18569bae8ad02ccf4d8411 (diff) | |
| parent | 3e2e04fae6787732c8de7eff0d525dfe8bf11b10 (diff) | |
| download | numpy-a0d0805545af0b683e960486b7036064fea084a4.tar.gz | |
Merge pull request #20076 from BvB93/comparison-docs
DOC: Document the dtype comparison operations
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/_add_newdocs.py | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py index 37f21211f..7467be80f 100644 --- a/numpy/core/_add_newdocs.py +++ b/numpy/core/_add_newdocs.py @@ -6113,6 +6113,68 @@ add_newdoc('numpy.core.multiarray', 'dtype', ('__class_getitem__', """)) +add_newdoc('numpy.core.multiarray', 'dtype', ('__ge__', + """ + __ge__(value, /) + + Return ``self >= value``. + + Equivalent to ``np.can_cast(value, self, casting="safe")``. + + See Also + -------- + can_cast : Returns True if cast between data types can occur according to + the casting rule. + + """)) + +add_newdoc('numpy.core.multiarray', 'dtype', ('__le__', + """ + __le__(value, /) + + Return ``self <= value``. + + Equivalent to ``np.can_cast(self, value, casting="safe")``. + + See Also + -------- + can_cast : Returns True if cast between data types can occur according to + the casting rule. + + """)) + +add_newdoc('numpy.core.multiarray', 'dtype', ('__gt__', + """ + __ge__(value, /) + + Return ``self > value``. + + Equivalent to + ``self != value and np.can_cast(value, self, casting="safe")``. + + See Also + -------- + can_cast : Returns True if cast between data types can occur according to + the casting rule. + + """)) + +add_newdoc('numpy.core.multiarray', 'dtype', ('__lt__', + """ + __lt__(value, /) + + Return ``self < value``. + + Equivalent to + ``self != value and np.can_cast(self, value, casting="safe")``. + + See Also + -------- + can_cast : Returns True if cast between data types can occur according to + the casting rule. + + """)) + ############################################################################## # # Datetime-related Methods |
