{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/5740","labels_url":"https://api.github.com/repos/numpy/numpy/issues/5740/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/5740/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/5740/events","html_url":"https://github.com/numpy/numpy/pull/5740","id":66072132,"number":5740,"title":"MAINT: Refactor .flags attribute of ndarray","user":{"login":"jaimefrio","id":3343990,"avatar_url":"https://avatars.githubusercontent.com/u/3343990?v=3","gravatar_id":"","url":"https://api.github.com/users/jaimefrio","html_url":"https://github.com/jaimefrio","followers_url":"https://api.github.com/users/jaimefrio/followers","following_url":"https://api.github.com/users/jaimefrio/following{/other_user}","gists_url":"https://api.github.com/users/jaimefrio/gists{/gist_id}","starred_url":"https://api.github.com/users/jaimefrio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaimefrio/subscriptions","organizations_url":"https://api.github.com/users/jaimefrio/orgs","repos_url":"https://api.github.com/users/jaimefrio/repos","events_url":"https://api.github.com/users/jaimefrio/events{/privacy}","received_events_url":"https://api.github.com/users/jaimefrio/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/numpy/numpy/labels/component:%20numpy.core","name":"component: numpy.core","color":"ff0000"},{"url":"https://api.github.com/repos/numpy/numpy/labels/Maintenance","name":"Maintenance","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-03T04:22:58Z","updated_at":"2015-04-05T02:09:48Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/numpy/numpy/pulls/5740","html_url":"https://github.com/numpy/numpy/pull/5740","diff_url":"https://github.com/numpy/numpy/pull/5740.diff","patch_url":"https://github.com/numpy/numpy/pull/5740.patch"},"body":"Fixes #5721. Changes include:\r\n\r\nThe object returned now fully behaves like a mutable attribute of\r\nthe array, by not using a cached, possibly outdated, value of the\r\nflags whenever the original array can be queried.\r\n\r\nAlso, the class constructor now requires being linked to either\r\nan array or a numpy scalar, can no longer be initialized without\r\nany argument.\r\n\r\nAlso, fixed the check for the FARRAY flag, which was notoriously\r\nbroken. As part of the fix, it was made to match PyArray_ISFARRAY\r\nand no longer requires that the array not be C_CONTIGUOUS.\r\n\r\nWhen possible, flag checks use the corresponding C function/macro,\r\nwhich may cause subtly different behavior, e.g. BEHAVED, CARRAY\r\nand FARRAY now also require that the dtype not be swapped.\r\n\r\nThe FORTRAN flag, which behaved differently from the\r\nPyArray_ISFORTRAN C macro, has been deprecated. It wasn't even\r\nmentioned in the docs, so it seems like a low risk change.\r\n\r\nThe code has been refactored to avoid repetition and made a little\r\nmore compact."},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/89704610","html_url":"https://github.com/numpy/numpy/pull/5740#issuecomment-89704610","issue_url":"https://api.github.com/repos/numpy/numpy/issues/5740","id":89704610,"user":{"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},"created_at":"2015-04-05T02:09:48Z","updated_at":"2015-04-05T02:09:48Z","body":"Will look through the first part tomorrow. Can you add something to the release notes describing the changes and deprecation?"}}