Skip to content

Commit 323fdf1

Browse files
committed
add type hints to group_distance
1 parent 2fbdeb0 commit 323fdf1

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

trimesh/grouping.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
from . import util
1111
from .constants import log, tol
12-
from .typed import ArrayLike, Integer, NDArray, Optional
12+
from .typed import ArrayLike, Integer, NDArray, Number, Optional, Sequence, Tuple
1313

1414
try:
1515
from scipy.spatial import cKDTree
@@ -666,14 +666,16 @@ def group_vectors(vectors, angle=1e-4, include_negative=False):
666666
return new_vectors, groups
667667

668668

669-
def group_distance(values, distance):
669+
def group_distance(
670+
values: ArrayLike, distance: Number
671+
) -> Tuple[NDArray[np.float64], Sequence]:
670672
"""
671673
Find non-overlapping groups of points where no two points in a
672674
group are farther than 2*distance apart.
673675
674676
Parameters
675677
---------
676-
values : (n, d) float
678+
values : (n, d) float
677679
Points of dimension d
678680
distance : float
679681
Max distance between points in a cluster

0 commit comments

Comments
 (0)