22from typing import Sequence
33
44import numpy as np
5+ import numpy .typing as npt
56from geocompy .data import Angle , Coordinate
67
78
@@ -132,7 +133,7 @@ def _weights_resection_horizontal(
132133 accuracy_hz : float = 1 ,
133134 accuracy_v : float = 1 ,
134135 accuracy_d : tuple [float , float ] = (1 , 1.5 )
135- ) -> np .ndarray :
136+ ) -> npt . NDArray [ np .floating ] :
136137 weights : list [float ] = []
137138
138139 accuracy_sd , accuracy_sd_ppm = accuracy_d
@@ -162,7 +163,7 @@ def _weights_resection_vertical(
162163 targets : list [Coordinate ],
163164 * ,
164165 accuracy_v : float = 1
165- ) -> np .ndarray :
166+ ) -> npt . NDArray [ np .floating ] :
166167 weights : list [float ] = []
167168
168169 accuracy_v_rad = math .radians (accuracy_v / 3600 )
@@ -187,8 +188,8 @@ def _iter_resection_horizontal(
187188 targets : list [Coordinate ],
188189 station : Coordinate ,
189190 orientation : Angle ,
190- weights : np .ndarray ,
191- ) -> tuple [np .ndarray , np .ndarray ]:
191+ weights : npt . NDArray [ np .floating ] ,
192+ ) -> tuple [npt . NDArray [ np .floating ], npt . NDArray [ np .floating ] ]:
192193 design_float , obs_float = _matrices_resection_horizontal (
193194 measurements ,
194195 targets ,
@@ -215,8 +216,8 @@ def _iter_resection_vertical(
215216 measurements : list [tuple [Angle , Angle , float ]],
216217 targets : list [Coordinate ],
217218 station : Coordinate ,
218- weights : np .ndarray
219- ) -> tuple [np .ndarray , np .ndarray ]:
219+ weights : npt . NDArray [ np .floating ]
220+ ) -> tuple [npt . NDArray [ np .floating ], npt . NDArray [ np .floating ] ]:
220221 design_float , obs_float = _matrices_resection_vertical (
221222 measurements ,
222223 targets ,
@@ -262,7 +263,7 @@ def resection_horizontal(
262263 o_tolerance = float (orientation_tolerance )
263264
264265 if uniform_weights :
265- weights = np .eye (len (measurements ) * 2 )
266+ weights : npt . NDArray [ np . floating ] = np .eye (len (measurements ) * 2 )
266267 else :
267268 weights = _weights_resection_horizontal (
268269 measurements ,
@@ -316,7 +317,7 @@ def resection_vertical(
316317 accuracy_v : float = 1
317318) -> tuple [Coordinate , Coordinate ]:
318319 if uniform_weights :
319- weights = np .eye (len (measurements ))
320+ weights : npt . NDArray [ np . floating ] = np .eye (len (measurements ))
320321 else :
321322 weights = _weights_resection_vertical (
322323 measurements ,
0 commit comments