[MRG + 1] docs: Change example of KDTree to prevent DeprecationWarning
diff --git a/sklearn/neighbors/binary_tree.pxi b/sklearn/neighbors/binary_tree.pxi
index de1e367b06461..db658f29b4d50 100755
--- a/sklearn/neighbors/binary_tree.pxi
+++ b/sklearn/neighbors/binary_tree.pxi
@@ -293,11 +293,10 @@ Examples
 Query for k-nearest neighbors
 
     >>> import numpy as np
-
     >>> np.random.seed(0)
     >>> X = np.random.random((10, 3))  # 10 points in 3 dimensions
     >>> tree = {BinaryTree}(X, leaf_size=2)              # doctest: +SKIP
-    >>> dist, ind = tree.query(X[0], k=3)                # doctest: +SKIP
+    >>> dist, ind = tree.query([X[0]], k=3)                # doctest: +SKIP
     >>> print ind  # indices of 3 closest neighbors
     [0 3 1]
     >>> print dist  # distances to 3 closest neighbors

<!--
Thanks for contributing a pull request! Please ensure you have taken a look at
the contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#Contributing-Pull-Requests
-->
#### Reference Issue

Fixes #6906 

<!-- Example: Fixes #1234 -->
#### What does this implement/fix? Explain your changes.
- fill in missing import statement of sklearn.neighbors.KDTree
- wrap X in a list
#### Any other comments?

<!--
Please be aware that we are a loose team of volunteers so patience is
necessary; assistance handling other issues is very welcome. We value
all user contributions, no matter how minor they are. If we are slow to
review, either the pull request needs some benchmarking, tinkering,
convincing, etc. or more likely the reviewers are simply busy. In either
case, we ask for your understanding during the review process.
For more information, see our FAQ on this topic:
http://scikit-learn.org/dev/faq.html#why-is-my-pull-request-not-getting-any-attention.

Thanks for contributing!
-->
- fill in missing import statement of sklearn.neighbors.KDTree
- wrap X in a list

Changes to be committed:
    modified:   sklearn/neighbors/binary_tree.pxi

Resolves: #6906
