{"action":"created","issue":{"url":"https://api.github.com/repos/BIDS/datarray/issues/68","repository_url":"https://api.github.com/repos/BIDS/datarray","labels_url":"https://api.github.com/repos/BIDS/datarray/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/BIDS/datarray/issues/68/comments","events_url":"https://api.github.com/repos/BIDS/datarray/issues/68/events","html_url":"https://github.com/BIDS/datarray/pull/68","id":157800910,"number":68,"title":"NF: add string and slice slicing of AxesManager","user":{"login":"matthew-brett","id":67612,"avatar_url":"https://avatars.githubusercontent.com/u/67612?v=3","gravatar_id":"","url":"https://api.github.com/users/matthew-brett","html_url":"https://github.com/matthew-brett","followers_url":"https://api.github.com/users/matthew-brett/followers","following_url":"https://api.github.com/users/matthew-brett/following{/other_user}","gists_url":"https://api.github.com/users/matthew-brett/gists{/gist_id}","starred_url":"https://api.github.com/users/matthew-brett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthew-brett/subscriptions","organizations_url":"https://api.github.com/users/matthew-brett/orgs","repos_url":"https://api.github.com/users/matthew-brett/repos","events_url":"https://api.github.com/users/matthew-brett/events{/privacy}","received_events_url":"https://api.github.com/users/matthew-brett/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-01T00:44:28Z","updated_at":"2016-06-01T18:43:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/BIDS/datarray/pulls/68","html_url":"https://github.com/BIDS/datarray/pull/68","diff_url":"https://github.com/BIDS/datarray/pull/68.diff","patch_url":"https://github.com/BIDS/datarray/pull/68.patch"},"body":"After this PR, you can do the following two slicing operations, that\r\npreviously raised errors:\r\n\r\n```\r\n>>> da = DataArray(np.ones((2, 3, 4)), 'abc')\r\n>>> da.axes['b']\r\nAxis(name='b', index=1, labels=None)\r\n>>> da.axes[1:]\r\n(Axis(name='b', index=1, labels=None), Axis(name='c', index=2,\r\nlabels=None))\r\n```\r\n\r\nNote that, as currently written, these two both return an Axis:\r\n\r\n```\r\n>>> da.axes['b']\r\nAxis(name='b', index=1, labels=None)\r\n>>> da.axes('b')\r\nAxis(name='b', index=1, labels=None)\r\n```"},"comment":{"url":"https://api.github.com/repos/BIDS/datarray/issues/comments/223087146","html_url":"https://github.com/BIDS/datarray/pull/68#issuecomment-223087146","issue_url":"https://api.github.com/repos/BIDS/datarray/issues/68","id":223087146,"user":{"login":"matthew-brett","id":67612,"avatar_url":"https://avatars.githubusercontent.com/u/67612?v=3","gravatar_id":"","url":"https://api.github.com/users/matthew-brett","html_url":"https://github.com/matthew-brett","followers_url":"https://api.github.com/users/matthew-brett/followers","following_url":"https://api.github.com/users/matthew-brett/following{/other_user}","gists_url":"https://api.github.com/users/matthew-brett/gists{/gist_id}","starred_url":"https://api.github.com/users/matthew-brett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthew-brett/subscriptions","organizations_url":"https://api.github.com/users/matthew-brett/orgs","repos_url":"https://api.github.com/users/matthew-brett/repos","events_url":"https://api.github.com/users/matthew-brett/events{/privacy}","received_events_url":"https://api.github.com/users/matthew-brett/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T18:43:32Z","updated_at":"2016-06-01T18:43:32Z","body":"Thinking about it - I am ambivalent about this change.  It's a bit annoying that there are now two ways to get an axis by name, and you can always to the slicing by iterating over the `axes`."}}
{"actor":{"display_login":"matthew-brett"}}