File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,3 +162,35 @@ def mad(input_data: np.ndarray) -> float:
162162
163163 """
164164 return np .median (np .abs (input_data - np .median (input_data )))
165+
166+
167+ def add_two_floats (first_value : float , second_value : float ) -> float :
168+ """Add Two Floats.
169+
170+ Add two float values.
171+
172+ Parameters
173+ ----------
174+ first_value : float
175+ First float value
176+ second_value : float
177+ Second float value
178+
179+ Returns
180+ -------
181+ float
182+ Result of addition
183+
184+ Raises
185+ ------
186+ TypeError
187+ For invalid input types.
188+
189+ """
190+ fv_is_float = isinstance (first_value , float )
191+ sv_is_float = isinstance (second_value , float )
192+
193+ if not all ((fv_is_float , sv_is_float )):
194+ raise TypeError ('Inputs must be floats.' )
195+
196+ return first_value + second_value
You can’t perform that action at this time.
0 commit comments