Skip to content

Commit ee8b41d

Browse files
committed
Wrapped BallTree in Cython.
Note that this wrapper does not include the BruteForceNeighbors() function from BallTree.h
1 parent 816a257 commit ee8b41d

File tree

7 files changed

+5957
-1000
lines changed

7 files changed

+5957
-1000
lines changed

scikits/learn/neighbors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import numpy as np
99

1010
from .base import BaseEstimator, ClassifierMixin, RegressorMixin
11-
from .ball_tree import BallTree, knn_brute
11+
from .ball_tree import PyBallTree as BallTree
1212
from .metrics import euclidean_distances
1313

1414

scikits/learn/setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ def configuration(parent_package='', top_path=None):
3838
warnings.warn(BlasNotFoundError.__doc__)
3939

4040
config.add_extension('ball_tree',
41-
sources=[join('src', 'BallTree.cpp')],
41+
sources=[join('src', 'ball_tree.cpp')],
42+
depends=[join('src', 'BallTree.h'),
43+
join('src', 'BallTreePoint.h')],
44+
libraries=["stdc++"],
4245
include_dirs=[numpy.get_include()])
4346

4447

0 commit comments

Comments
 (0)