New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KDTree example in docs produces DeprecationWarning #6906
Comments
Oh, dist, ind = tree.query([X[0]], k=3) |
yes, wrapping in a list being much like |
My point was: the docs should probably be updated. :-) |
You're right. Sorry :/ |
Feel free to submit a PR fixing |
It might also be interesting to try creating doctest fixtures that raise warnings as exceptions. |
- 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: scikit-learn#6906
- remove import statement of sklearn.neighbors.KDTree Changes to be committed: modified: sklearn/neighbors/binary_tree.pxi Resolves: scikit-learn#6906
#6962) * docs: Change example of KDTree to prevent DeprecationWarning - 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 * docs: remove import statement of KDTree in example of KDTree - remove import statement of sklearn.neighbors.KDTree Changes to be committed: modified: sklearn/neighbors/binary_tree.pxi Resolves: #6906
scikit-learn#6962) * docs: Change example of KDTree to prevent DeprecationWarning - 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: scikit-learn#6906 * docs: remove import statement of KDTree in example of KDTree - remove import statement of sklearn.neighbors.KDTree Changes to be committed: modified: sklearn/neighbors/binary_tree.pxi Resolves: scikit-learn#6906
scikit-learn#6962) * docs: Change example of KDTree to prevent DeprecationWarning - 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: scikit-learn#6906 * docs: remove import statement of KDTree in example of KDTree - remove import statement of sklearn.neighbors.KDTree Changes to be committed: modified: sklearn/neighbors/binary_tree.pxi Resolves: scikit-learn#6906
The basic KDTree example from the docs produces a
DeprecatioinWarning
(tested with 0.17.1):==>
I'm not (yet) very familiar with scikit-learn. But doesn't it seem "wrong" to say "Passing 1d arrays as data is deprecated" when the
X
passed is actually 2d?The text was updated successfully, but these errors were encountered: