{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/5409","labels_url":"https://api.github.com/repos/numpy/numpy/issues/5409/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/5409/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/5409/events","html_url":"https://github.com/numpy/numpy/pull/5409","id":53223414,"number":5409,"title":"Solves #5407: Implement and test writable view for the diagonal function","user":{"login":"maniteja123","id":6291963,"avatar_url":"https://avatars.githubusercontent.com/u/6291963?v=3","gravatar_id":"","url":"https://api.github.com/users/maniteja123","html_url":"https://github.com/maniteja123","followers_url":"https://api.github.com/users/maniteja123/followers","following_url":"https://api.github.com/users/maniteja123/following{/other_user}","gists_url":"https://api.github.com/users/maniteja123/gists{/gist_id}","starred_url":"https://api.github.com/users/maniteja123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maniteja123/subscriptions","organizations_url":"https://api.github.com/users/maniteja123/orgs","repos_url":"https://api.github.com/users/maniteja123/repos","events_url":"https://api.github.com/users/maniteja123/events{/privacy}","received_events_url":"https://api.github.com/users/maniteja123/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/numpy/numpy/labels/component%3A+numpy.core","name":"component: numpy.core","color":"ff0000"},{"url":"https://api.github.com/repos/numpy/numpy/labels/Task","name":"Task","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/numpy/numpy/milestones/30","labels_url":"https://api.github.com/repos/numpy/numpy/milestones/30/labels","id":518598,"number":30,"title":"1.10 blockers","description":"","creator":{"login":"seberg","id":61977,"avatar_url":"https://avatars.githubusercontent.com/u/61977?v=3","gravatar_id":"","url":"https://api.github.com/users/seberg","html_url":"https://github.com/seberg","followers_url":"https://api.github.com/users/seberg/followers","following_url":"https://api.github.com/users/seberg/following{/other_user}","gists_url":"https://api.github.com/users/seberg/gists{/gist_id}","starred_url":"https://api.github.com/users/seberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seberg/subscriptions","organizations_url":"https://api.github.com/users/seberg/orgs","repos_url":"https://api.github.com/users/seberg/repos","events_url":"https://api.github.com/users/seberg/events{/privacy}","received_events_url":"https://api.github.com/users/seberg/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":3,"state":"open","created_at":"2013-12-20T16:52:18Z","updated_at":"2015-01-01T17:15:47Z","due_on":null,"closed_at":null},"comments":21,"created_at":"2015-01-01T16:45:04Z","updated_at":"2015-01-01T20:15:44Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/numpy/numpy/pulls/5409","html_url":"https://github.com/numpy/numpy/pull/5409","diff_url":"https://github.com/numpy/numpy/pull/5409.diff","patch_url":"https://github.com/numpy/numpy/pull/5409.patch"},"body":"Implements task raised in issue #5407. \r\nThe ``ndarray.diagonal`` method currently returns a view, but it is not writeable. It is documented to return a writeable view in 1.10.\r\nCorrespondingly, the ``writable`` flag is set to ``True`` and the assert statement and the test function are changed accordingly."},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/68496822","html_url":"https://github.com/numpy/numpy/pull/5409#issuecomment-68496822","issue_url":"https://api.github.com/repos/numpy/numpy/issues/5409","id":68496822,"user":{"login":"maniteja123","id":6291963,"avatar_url":"https://avatars.githubusercontent.com/u/6291963?v=3","gravatar_id":"","url":"https://api.github.com/users/maniteja123","html_url":"https://github.com/maniteja123","followers_url":"https://api.github.com/users/maniteja123/followers","following_url":"https://api.github.com/users/maniteja123/following{/other_user}","gists_url":"https://api.github.com/users/maniteja123/gists{/gist_id}","starred_url":"https://api.github.com/users/maniteja123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maniteja123/subscriptions","organizations_url":"https://api.github.com/users/maniteja123/orgs","repos_url":"https://api.github.com/users/maniteja123/repos","events_url":"https://api.github.com/users/maniteja123/events{/privacy}","received_events_url":"https://api.github.com/users/maniteja123/received_events","type":"User","site_admin":false},"created_at":"2015-01-01T20:15:44Z","updated_at":"2015-01-01T20:15:44Z","body":"@abalkin The documentation suggests that the ``diag`` returns a copy, but as you pointed it is read-only view until this change, now if I am testing it, it is accepting it and also the ``WRITABLE`` flag is now ``True``. The test also worked accordingly, https://github.com/numpy/numpy/pull/5409/files#diff-bc1e8d40b8b7758facc5e143be016f99R1750"}}