Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update correspondences.py #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

kuzand
Copy link
Contributor

@kuzand kuzand commented Sep 21, 2021

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.

```
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.
@ThibaultGROUEIX
Copy link
Owner

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants