{"action":"opened","issue":{"url":"https://api.github.com/repos/scipy/scipy/issues/6515","repository_url":"https://api.github.com/repos/scipy/scipy","labels_url":"https://api.github.com/repos/scipy/scipy/issues/6515/labels{/name}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/6515/comments","events_url":"https://api.github.com/repos/scipy/scipy/issues/6515/events","html_url":"https://github.com/scipy/scipy/issues/6515","id":172913328,"number":6515,"title":"cKDTree returns only inf values in case number of data points is smaller than k.","user":{"login":"heistermann","id":7724047,"avatar_url":"https://avatars.githubusercontent.com/u/7724047?v=3","gravatar_id":"","url":"https://api.github.com/users/heistermann","html_url":"https://github.com/heistermann","followers_url":"https://api.github.com/users/heistermann/followers","following_url":"https://api.github.com/users/heistermann/following{/other_user}","gists_url":"https://api.github.com/users/heistermann/gists{/gist_id}","starred_url":"https://api.github.com/users/heistermann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heistermann/subscriptions","organizations_url":"https://api.github.com/users/heistermann/orgs","repos_url":"https://api.github.com/users/heistermann/repos","events_url":"https://api.github.com/users/heistermann/events{/privacy}","received_events_url":"https://api.github.com/users/heistermann/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-08-24T10:06:41Z","updated_at":"2016-08-24T10:06:41Z","closed_at":null,"body":"The following behaviour was found in `scipy 0.18.0`. It differs from previous versions. Is this intended?\r\n\r\n```python\r\n>>> from scipy.spatial import cKDTree\r\n>>> import numpy as np\r\n>>> src = np.vstack( (np.array([1, 7]), np.array([5, 4])) ).T\r\n>>> trg = np.vstack( (np.array([1, 10]), np.array([1, 10])) ).T\r\n>>> print(src)\r\n[[1 5]\r\n [7 4]]\r\n>>> print(trg)\r\n[[ 1  1]\r\n [10 10]]\r\n>>> tree = cKDTree(src)\r\n>>> dists, ix = tree.query(trg, k=2)\r\n>>> print(dists.round(1))\r\n[[  4.    6.7]\r\n [  6.7  10.3]]\r\n>>> dists, ix = tree.query(trg, k=3)\r\n>>> print(dists)\r\n[[ inf  inf  inf]\r\n [ inf  inf  inf]]\r\n\r\n```"}}
{"actor":{"display_login":"heistermann"}}