Skip to content

Commit bca3a4c

Browse files
committed
Additional docstring fixes for issue scikit-learn#3167
1 parent b3cda92 commit bca3a4c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

sklearn/neighbors/base.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -343,10 +343,10 @@ def kneighbors_graph(self, X, n_neighbors=None,
343343
>>> neigh.fit(X) # doctest: +ELLIPSIS
344344
NearestNeighbors(algorithm='auto', leaf_size=30, ...)
345345
>>> A = neigh.kneighbors_graph(X)
346-
>>> A.todense()
347-
matrix([[ 1., 0., 1.],
348-
[ 0., 1., 1.],
349-
[ 1., 0., 1.]])
346+
>>> A.toarray()
347+
array([[ 1., 0., 1.],
348+
[ 0., 1., 1.],
349+
[ 1., 0., 1.]])
350350
351351
See also
352352
--------
@@ -523,10 +523,10 @@ def radius_neighbors_graph(self, X, radius=None, mode='connectivity'):
523523
>>> neigh.fit(X) # doctest: +ELLIPSIS
524524
NearestNeighbors(algorithm='auto', leaf_size=30, ...)
525525
>>> A = neigh.radius_neighbors_graph(X)
526-
>>> A.todense()
527-
matrix([[ 1., 0., 1.],
528-
[ 0., 1., 0.],
529-
[ 1., 0., 1.]])
526+
>>> A.toarray()
527+
array([[ 1., 0., 1.],
528+
[ 0., 1., 0.],
529+
[ 1., 0., 1.]])
530530
531531
See also
532532
--------

0 commit comments

Comments
 (0)