Skip to content

Commit e602552

Browse files
authored
DOC improve docstring example of NearestNeighbors (scikit-learn#26728)
1 parent a2f1779 commit e602552

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

sklearn/neighbors/_unsupervised.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,14 +116,11 @@ class NearestNeighbors(KNeighborsMixin, RadiusNeighborsMixin, NeighborsBase):
116116
>>> import numpy as np
117117
>>> from sklearn.neighbors import NearestNeighbors
118118
>>> samples = [[0, 0, 2], [1, 0, 0], [0, 0, 1]]
119-
120119
>>> neigh = NearestNeighbors(n_neighbors=2, radius=0.4)
121120
>>> neigh.fit(samples)
122121
NearestNeighbors(...)
123-
124122
>>> neigh.kneighbors([[0, 0, 1.3]], 2, return_distance=False)
125123
array([[2, 0]]...)
126-
127124
>>> nbrs = neigh.radius_neighbors(
128125
... [[0, 0, 1.3]], 0.4, return_distance=False
129126
... )

0 commit comments

Comments
 (0)