Skip to content
Snippets Groups Projects
Commit 034a5ddd authored by Alexandre Gramfort's avatar Alexandre Gramfort
Browse files

FIX fragile doctest

parent 01e93e74
No related branches found
No related tags found
No related merge requests found
...@@ -166,10 +166,10 @@ def kneighbors_graph(X, k, with_dist=True): ...@@ -166,10 +166,10 @@ def kneighbors_graph(X, k, with_dist=True):
-------- --------
>>> X = [[0., 0., 0.], [0., .5, 0.], [1., 1., .5]] >>> X = [[0., 0., 0.], [0., .5, 0.], [1., 1., .5]]
>>> A = kneighbors_graph(X, k=2, with_dist=False) >>> A = kneighbors_graph(X, k=2, with_dist=False)
>>> print A >>> print A.todense()
(0, 1) 1.0 [[ 0. 1. 0.]
(1, 0) 1.0 [ 1. 0. 0.]
(2, 1) 1.0 [ 0. 1. 0.]]
""" """
from scipy import sparse from scipy import sparse
X = np.asanyarray(X) X = np.asanyarray(X)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment