Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use a non-SciPy nearest-neighbor function #12

@jfinkels

Description

@jfinkels

Assuming the changes suggested in pull request #10 are acceptable, we can remove the dependency on SciPy entirely just by reimplementing the get_nearest_neighbor_distances function. This will facilitate goftests being runnable on PyPy, which does not yet have SciPy support.

Here is a short, pure Python nearest-neighbor function backed by a k-d tree: http://code.activestate.com/recipes/577497-kd-tree-for-nearest-neighbor-search-in-a-k-dimensi/. It is published under an MIT license. Since we don't need any other behavior from the k-d tree (we just need to find the distance of each point to its nearest neighbor), I think incorporating that code is the best approach.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions