3D-CODED icon indicating copy to clipboard operation
3D-CODED copied to clipboard

Update correspondences.py

Open kuzand opened this issue 2 years ago • 1 comments

closest_points = np.mean(closest_points, 1, keepdims=False)

I think it can be replaced by closest_points.squeeze(), since the dimension of closest_points is (N, 1, 3) and by taking np.mean along the axis 1 is equivalent to just squeezing it. It will be much readable and maybe slightly faster.

kuzand avatar Sep 21 '21 11:09 kuzand

Hi @kuzand,

Sorry I somehow did not attend to this sooner. I will keep np.mean(closest_points, 1, keepdims=False) because i'd like to maintain the possibility to query more than 1 neighbour. Thanks a lot anyway!

ThibaultGROUEIX avatar Nov 18 '21 16:11 ThibaultGROUEIX