MCPcopy Create free account
hub / github.com/numpy/numpy / Infinity

Class Infinity

numpy/_utils/_pep440.py:45–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43
44
45class Infinity:
46 def __repr__(self):
47 return "Infinity"
48
49 def __hash__(self):
50 return hash(repr(self))
51
52 def __lt__(self, other):
53 return False
54
55 def __le__(self, other):
56 return False
57
58 def __eq__(self, other):
59 return isinstance(other, self.__class__)
60
61 def __ne__(self, other):
62 return not isinstance(other, self.__class__)
63
64 def __gt__(self, other):
65 return True
66
67 def __ge__(self, other):
68 return True
69
70 def __neg__(self):
71 return NegativeInfinity
72
73
74Infinity = Infinity()

Callers 1

_pep440.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected