File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ def xy_to_bbox(xy: np.ndarray, buffer: float = 0.0) -> BoundingBox:
15
15
16
16
17
17
def dist_in_meters (
18
- coords : np .ndarray , pt : tuple [float , float ], is_geo : bool = False
18
+ coords : np .ndarray , pt : tuple [float , float ] | np . ndarray , is_geo : bool = False
19
19
) -> np .ndarray :
20
20
"""Get distance between array of coordinates and point.
21
21
@@ -46,7 +46,9 @@ def dist_in_meters(
46
46
return d # type: ignore
47
47
48
48
49
- def _get_dist_geo (lon : float , lat : float , lon1 : float , lat1 : float ) -> float :
49
+ def _get_dist_geo (
50
+ lon : float | np .ndarray , lat : float | np .ndarray , lon1 : float , lat1 : float
51
+ ) -> float :
50
52
# assuming input in degrees!
51
53
R = 6371e3 # Earth radius in metres
52
54
dlon = np .deg2rad (lon1 - lon )
You can’t perform that action at this time.
0 commit comments