{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/6054","repository_url":"https://api.github.com/repos/numpy/numpy","labels_url":"https://api.github.com/repos/numpy/numpy/issues/6054/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/6054/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/6054/events","html_url":"https://github.com/numpy/numpy/pull/6054","id":93834002,"number":6054,"title":"WIP: MAINT: Add deprecation warning to views of multi-field indexes","user":{"login":"ahaldane","id":9040124,"avatar_url":"https://avatars.githubusercontent.com/u/9040124?v=3","gravatar_id":"","url":"https://api.github.com/users/ahaldane","html_url":"https://github.com/ahaldane","followers_url":"https://api.github.com/users/ahaldane/followers","following_url":"https://api.github.com/users/ahaldane/following{/other_user}","gists_url":"https://api.github.com/users/ahaldane/gists{/gist_id}","starred_url":"https://api.github.com/users/ahaldane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahaldane/subscriptions","organizations_url":"https://api.github.com/users/ahaldane/orgs","repos_url":"https://api.github.com/users/ahaldane/repos","events_url":"https://api.github.com/users/ahaldane/events{/privacy}","received_events_url":"https://api.github.com/users/ahaldane/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/numpy/numpy/labels/10%20-%20Maintenance","name":"10 - Maintenance","color":"fef2c0"},{"url":"https://api.github.com/repos/numpy/numpy/labels/component:%20numpy.core","name":"component: numpy.core","color":"009800"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/numpy/numpy/milestones/41","html_url":"https://github.com/numpy/numpy/milestones/1.12.0%20release","labels_url":"https://api.github.com/repos/numpy/numpy/milestones/41/labels","id":1503092,"number":41,"title":"1.12.0 release","description":"Tag for the Numpy 1.12.0 release.","creator":{"login":"charris","id":77272,"avatar_url":"https://avatars.githubusercontent.com/u/77272?v=3","gravatar_id":"","url":"https://api.github.com/users/charris","html_url":"https://github.com/charris","followers_url":"https://api.github.com/users/charris/followers","following_url":"https://api.github.com/users/charris/following{/other_user}","gists_url":"https://api.github.com/users/charris/gists{/gist_id}","starred_url":"https://api.github.com/users/charris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charris/subscriptions","organizations_url":"https://api.github.com/users/charris/orgs","repos_url":"https://api.github.com/users/charris/repos","events_url":"https://api.github.com/users/charris/events{/privacy}","received_events_url":"https://api.github.com/users/charris/received_events","type":"User","site_admin":false},"open_issues":29,"closed_issues":52,"state":"open","created_at":"2016-01-12T20:39:09Z","updated_at":"2016-09-18T13:50:57Z","due_on":null,"closed_at":null},"comments":13,"created_at":"2015-07-08T16:27:42Z","updated_at":"2016-09-20T03:45:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/numpy/numpy/pulls/6054","html_url":"https://github.com/numpy/numpy/pull/6054","diff_url":"https://github.com/numpy/numpy/pull/6054.diff","patch_url":"https://github.com/numpy/numpy/pull/6054.patch"},"body":"As discussed in #6053, in preparation for making multi-field indices return a view instead of a copy, this adds a deprecation warning when attempting to view the result of a multi-field index, as in:\r\n\r\n    >>> a = ones(10, dtype='i8,i8,i8')\r\n    >>> b = a[['f0','f2']\r\n    >>> b.view('i4') # Deprecation warning\r\n\r\nSuch code will break any time we convert copies to views, because the byte arrangement of copies and views is necessarily different. I'd like to get it in for 1.10, so we can more easily make the copy->view change in 1.11.\r\n\r\nMy computer access is limited right now so this PR might be a bit rough, I'll tidy it later. Just posting for feedback now.\r\n\r\nOne thing I haven't figured out is how to make the unit tests show the deprecation warning: There are unit tests which I know show the warning (`test_field_names`) but the warnings don't show up when I run `np.test('full')` or even `np.test('full', raise_warnings=[FutureWarning])`. I'd like to use this to catch all the numpy code that will break when convertingmulti-field  copies to view. Any ideas?\r\n"},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/248193797","html_url":"https://github.com/numpy/numpy/pull/6054#issuecomment-248193797","issue_url":"https://api.github.com/repos/numpy/numpy/issues/6054","id":248193797,"user":{"login":"ahaldane","id":9040124,"avatar_url":"https://avatars.githubusercontent.com/u/9040124?v=3","gravatar_id":"","url":"https://api.github.com/users/ahaldane","html_url":"https://github.com/ahaldane","followers_url":"https://api.github.com/users/ahaldane/followers","following_url":"https://api.github.com/users/ahaldane/following{/other_user}","gists_url":"https://api.github.com/users/ahaldane/gists{/gist_id}","starred_url":"https://api.github.com/users/ahaldane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahaldane/subscriptions","organizations_url":"https://api.github.com/users/ahaldane/orgs","repos_url":"https://api.github.com/users/ahaldane/repos","events_url":"https://api.github.com/users/ahaldane/events{/privacy}","received_events_url":"https://api.github.com/users/ahaldane/received_events","type":"User","site_admin":false},"created_at":"2016-09-20T03:45:08Z","updated_at":"2016-09-20T03:45:08Z","body":"Whoops! I forgot to run all the tests.\r\n\r\nHopefully I got them all now."}}
{"actor":{"display_login":"ahaldane"}}