The issue with the spatial.KDTree.query was solved by replacing k=None with K=len(Xout). This returns the maximum number of neighbors. The ones with inf distance are then eliminated.
The function yields the same results as with using scipy version 1.7.3.
Further optimization can be made to fasten the code.
In GitLab by @julioRodino on Mar 6, 2024, 17:34
Merges 1-fix-scipy-compatibility -> master
Closes #1
The issue with the spatial.KDTree.query was solved by replacing
k=None
withK=len(Xout)
. This returns the maximum number of neighbors. The ones withinf
distance are then eliminated.The function yields the same results as with using scipy version 1.7.3.
Further optimization can be made to fasten the code.