{"action":"reopened","issue":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/1400","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/1400/labels{/name}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/1400/comments","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/1400/events","html_url":"https://github.com/scikit-learn/scikit-learn/issues/1400","id":8611120,"number":1400,"title":"Inconsistency in return type of `radius_neighbors`","user":{"login":"jakevdp","id":781659,"avatar_url":"https://avatars.githubusercontent.com/u/781659?v=3","gravatar_id":"","url":"https://api.github.com/users/jakevdp","html_url":"https://github.com/jakevdp","followers_url":"https://api.github.com/users/jakevdp/followers","following_url":"https://api.github.com/users/jakevdp/following{/other_user}","gists_url":"https://api.github.com/users/jakevdp/gists{/gist_id}","starred_url":"https://api.github.com/users/jakevdp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakevdp/subscriptions","organizations_url":"https://api.github.com/users/jakevdp/orgs","repos_url":"https://api.github.com/users/jakevdp/repos","events_url":"https://api.github.com/users/jakevdp/events{/privacy}","received_events_url":"https://api.github.com/users/jakevdp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2012-11-23T16:54:47Z","updated_at":"2015-01-29T21:54:44Z","closed_at":null,"body":"This follows a  <a href=\"http://sourceforge.net/mailarchive/forum.php?thread_name=CAFvE7K6-bgP7coaDgw2%3Dz59nGsT08aTgUczs0PWks3nTsEx5dQ%40mail.gmail.com&forum_name=scikit-learn-general\"> discussion</a> on the mailing list.\n\nThere is an inconsistency in the radius_neighbors function: when there are the same number of neighbors for every queried point (rare except when a single point is queried), the 'brute' and 'kd_tree' methods modify the type of the returned array; the 'ball_tree' method does not.\n\nThis should be remedied, and there are two possibilities:\n\n- change the behavior of the `ball_tree` option to match that of the others.\n\n    **Advantages:** more intuitive behavior in the case of a single point or multiple \n                               points with the same number of neighbors\n    **Disadvantages:** inconsistent return type depending on how many neighbors\n                                     are queried.  This may lead to more confusion when code works\n                                     in one situation but not in another\n\n- change the behavior of `brute` and `kd_tree` to match that of `ball_tree`\n\n    **Advantages:** common return type regardless of input\n    **Disadvantages:** object arrays are confusing, especially when not required due to \"rows\" being of different size.\n\nThis is related to PR #1399"}}