MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / __add__

Method __add__

lib/matplotlib/testing/jpl_units/Epoch.py:126–142  ·  view source on GitHub ↗

Add a duration to an Epoch. = INPUT VARIABLES - rhs The Epoch to subtract. = RETURN VALUE - Returns the difference of ourselves and the input Epoch.

(self, rhs)

Source from the content-addressed store, hash-verified

124 __ge__ = functools.partialmethod(_cmp, operator.ge)
125
126 def __add__(self, rhs):
127 """
128 Add a duration to an Epoch.
129
130 = INPUT VARIABLES
131 - rhs The Epoch to subtract.
132
133 = RETURN VALUE
134 - Returns the difference of ourselves and the input Epoch.
135 """
136 t = self
137 if self._frame != rhs.frame():
138 t = self.convert(rhs._frame)
139
140 sec = t._seconds + rhs.seconds()
141
142 return Epoch(t._frame, sec, t._jd)
143
144 def __sub__(self, rhs):
145 """

Callers

nothing calls this directly

Calls 4

convertMethod · 0.95
EpochClass · 0.85
secondsMethod · 0.80
frameMethod · 0.45

Tested by

no test coverage detected