Deprecations to clean up `scipy.spatial` api

Hi all,

I would like to propose some new deprecation to remove functions from scipy.spatialthat appear to be unused / are inferior duplicates of other functions:

This function is a duplicate of scipy.spatial.distance.cdist. The only possible additional functionality it offers is the following argument

image

however in my benchmark it had the same memory usage as cdist with worse performance.

Searching on GitHub I cannot find any uses: Code search results · GitHub

  • minkowski_distance

This function is a duplicate of scipy.spatial.distance.minkowski / scipy.spatial.distance.cdist

Again I could not find any uses: Code search results · GitHub

  • minkowski_distance_p

Same as minkowski_distance except it doesn’t take the root. You might think this could be useful for performance but it is still slower than manually just taking the root of the result from scipy.spatial.distance.minkowski ENH: spatial.minkowski_distance/minkowski_distance_p: add array api support by j-bowhay · Pull Request #24710 · scipy/scipy · GitHub

  • tsearch

This is a convenience function for Delaunay.find_simplex however it offers no convenience as still need to have constructed the Delaunay triangulation so you may as well just use Delaunay.find_simplex! Again, does not seem to be used: Code search results · GitHub

Please let me know if there are any objections to deprecating and then removing these functions!

cc. @tylerjereddy as the spatial regular

Regards,

Jake

1 Like