xorbitsai / xorbits

Scalable Python DS & ML, in an API compatible & lightning fast way.
https://xorbits.io
Apache License 2.0
1.06k stars 67 forks source link

BUG: `xorbits._mars.learn.neighbors.NearestNeighbors` doesn't work #739

Open JiaYaobo opened 9 months ago

JiaYaobo commented 9 months ago

Describe the bug

from xorbits._mars.learn.neighbors import NearestNeighbors
import numpy as np

X = np.array([[0, 1], [1, 0], [1, 1], [0, 0]])
nbrs = NearestNeighbors(n_neighbors=2, algorithm='ball_tree').fit(X)

Output:

TypeError: argument of type 'builtin_function_or_method' is not iterable

And run

pytest xorbits/_mars/learn/neighbors/tests/test_nearest_neighbors.py

all tests failed