{"action":"created","issue":{"url":"https://api.github.com/repos/blaze/dask/issues/971","repository_url":"https://api.github.com/repos/blaze/dask","labels_url":"https://api.github.com/repos/blaze/dask/issues/971/labels{/name}","comments_url":"https://api.github.com/repos/blaze/dask/issues/971/comments","events_url":"https://api.github.com/repos/blaze/dask/issues/971/events","html_url":"https://github.com/blaze/dask/issues/971","id":132403726,"number":971,"title":"dask.array take issue","user":{"login":"alimanfoo","id":703554,"avatar_url":"https://avatars.githubusercontent.com/u/703554?v=3","gravatar_id":"","url":"https://api.github.com/users/alimanfoo","html_url":"https://github.com/alimanfoo","followers_url":"https://api.github.com/users/alimanfoo/followers","following_url":"https://api.github.com/users/alimanfoo/following{/other_user}","gists_url":"https://api.github.com/users/alimanfoo/gists{/gist_id}","starred_url":"https://api.github.com/users/alimanfoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alimanfoo/subscriptions","organizations_url":"https://api.github.com/users/alimanfoo/orgs","repos_url":"https://api.github.com/users/alimanfoo/repos","events_url":"https://api.github.com/users/alimanfoo/events{/privacy}","received_events_url":"https://api.github.com/users/alimanfoo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-09T12:06:05Z","updated_at":"2016-02-09T15:02:34Z","closed_at":null,"body":"I'm getting an error attempting to call da.take(a, axis=1). Sorry I don't have minimal reproducible example, but here's the context:\r\n\r\n![image](https://cloud.githubusercontent.com/assets/703554/12915762/41bc6d68-cf25-11e5-8475-efbf21f2bf76.png)\r\n\r\n...and here's the stack trace:\r\n\r\n```\r\n---------------------------------------------------------------------------\r\nNameError                                 Traceback (most recent call last)\r\n<ipython-input-20-fde38592888e> in <module>()\r\n----> 1 gds = da.take(gd, pop1_sample_indices, axis=1)\r\n      2 gds\r\n\r\n/usr/local/lib/python3.5/dist-packages/dask/array/core.py in take(a, indices, axis)\r\n   1851         return _take_dask_array_from_numpy(a, indices, axis)\r\n   1852     else:\r\n-> 1853         return a[(slice(None),) * axis + (indices,)]\r\n   1854 \r\n   1855 \r\n\r\n/usr/local/lib/python3.5/dist-packages/dask/array/core.py in __getitem__(self, index)\r\n    985             return self\r\n    986 \r\n--> 987         dsk, chunks = slice_array(out, self.name, self.chunks, index)\r\n    988 \r\n    989         return Array(merge(self.dask, dsk), out, chunks, dtype=self._dtype)\r\n\r\n/usr/local/lib/python3.5/dist-packages/dask/array/slicing.py in slice_array(out_name, in_name, blockdims, index)\r\n    117     \"\"\"\r\n    118     index = replace_ellipsis(len(blockdims), index)\r\n--> 119     index = tuple(map(sanitize_index, index))\r\n    120     blockdims = tuple(map(tuple, blockdims))\r\n    121 \r\n\r\n/usr/local/lib/python3.5/dist-packages/dask/array/slicing.py in sanitize_index(ind)\r\n     53         return ind\r\n     54 \r\n---> 55     raise IndexError(\"Invalid index\", i)\r\n     56 \r\n     57 \r\n\r\nNameError: name 'i' is not defined\r\n```\r\n\r\nWeird thing is, I don't know why dask is even trying to raise an IndexError, the indices are perfectly valid for the array."},"comment":{"url":"https://api.github.com/repos/blaze/dask/issues/comments/181905027","html_url":"https://github.com/blaze/dask/issues/971#issuecomment-181905027","issue_url":"https://api.github.com/repos/blaze/dask/issues/971","id":181905027,"user":{"login":"mrocklin","id":306380,"avatar_url":"https://avatars.githubusercontent.com/u/306380?v=3","gravatar_id":"","url":"https://api.github.com/users/mrocklin","html_url":"https://github.com/mrocklin","followers_url":"https://api.github.com/users/mrocklin/followers","following_url":"https://api.github.com/users/mrocklin/following{/other_user}","gists_url":"https://api.github.com/users/mrocklin/gists{/gist_id}","starred_url":"https://api.github.com/users/mrocklin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrocklin/subscriptions","organizations_url":"https://api.github.com/users/mrocklin/orgs","repos_url":"https://api.github.com/users/mrocklin/repos","events_url":"https://api.github.com/users/mrocklin/events{/privacy}","received_events_url":"https://api.github.com/users/mrocklin/received_events","type":"User","site_admin":false},"created_at":"2016-02-09T15:02:34Z","updated_at":"2016-02-09T15:02:34Z","body":"This is fixed, I think, in #972 "}}