{"action":"created","issue":{"url":"https://api.github.com/repos/numpy/numpy/issues/6358","labels_url":"https://api.github.com/repos/numpy/numpy/issues/6358/labels{/name}","comments_url":"https://api.github.com/repos/numpy/numpy/issues/6358/comments","events_url":"https://api.github.com/repos/numpy/numpy/issues/6358/events","html_url":"https://github.com/numpy/numpy/issues/6358","id":108305530,"number":6358,"title":"Fix vdot or revert making ravel create less copies","user":{"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},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/numpy/numpy/milestones/35","html_url":"https://github.com/numpy/numpy/milestones/1.10.0%20release","labels_url":"https://api.github.com/repos/numpy/numpy/milestones/35/labels","id":1055363,"number":35,"title":"1.10.0 release","description":"Marker for PRs that should go into Numpy 1.10.1.","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":11,"closed_issues":116,"state":"open","created_at":"2015-04-07T00:02:10Z","updated_at":"2015-09-26T17:50:04Z","due_on":null,"closed_at":null},"comments":8,"created_at":"2015-09-25T11:06:27Z","updated_at":"2015-09-26T23:07:20Z","closed_at":null,"body":"The changed `vdot` code relied on `ravel` always returning a contiguous array. With the also changed `ravel` code to *always* return a view when possible, `ravel` can return arrays with a non-contiguous memory layout:\r\n```\r\nIn [6]: arr = np.zeros((5, 5, 5))[..., 0].ravel()\r\n\r\nIn [7]: arr.flags\r\nOut[7]: \r\n  C_CONTIGUOUS : False\r\n```\r\n\r\nPreviously, this would return a contiguous copy with the exception of \"keeporder\":\r\n```\r\nIn [5]: arr = np.zeros((5, 5, 5))[..., 0].ravel('K')\r\n\r\nIn [6]: arr.flags\r\nOut[6]: \r\n  C_CONTIGUOUS : False\r\nIn [7]: np.__version__\r\nOut[7]: '1.8.2'\r\n```\r\n\r\nWhile the `vdot` code may be just be called buggy, the question is whether we should avoid potential problems for other C-interfacing code and instead of changing `vdot` just revert `ravel` and document this behaviour.\r\nUsers who would prefer the new definition can be pointed to use `arr.reshape(-1)` for most purposes (\"keeporder\" is an exception)."},"comment":{"url":"https://api.github.com/repos/numpy/numpy/issues/comments/143503514","html_url":"https://github.com/numpy/numpy/issues/6358#issuecomment-143503514","issue_url":"https://api.github.com/repos/numpy/numpy/issues/6358","id":143503514,"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-09-26T23:07:20Z","updated_at":"2015-09-26T23:07:20Z","body":"@insertinterestingnamehere  I'm most concerned that ravel may have been used to set up arrays before passing them to extensions written in C or Fortran."}}