{"action":"created","issue":{"url":"https://api.github.com/repos/gonum/matrix/issues/93","labels_url":"https://api.github.com/repos/gonum/matrix/issues/93/labels{/name}","comments_url":"https://api.github.com/repos/gonum/matrix/issues/93/comments","events_url":"https://api.github.com/repos/gonum/matrix/issues/93/events","html_url":"https://github.com/gonum/matrix/issues/93","id":54843618,"number":93,"title":"Problems when a Dense/Vector is a receiver and an argument","user":{"login":"btracey","id":3680859,"avatar_url":"https://avatars.githubusercontent.com/u/3680859?v=3","gravatar_id":"","url":"https://api.github.com/users/btracey","html_url":"https://github.com/btracey","followers_url":"https://api.github.com/users/btracey/followers","following_url":"https://api.github.com/users/btracey/following{/other_user}","gists_url":"https://api.github.com/users/btracey/gists{/gist_id}","starred_url":"https://api.github.com/users/btracey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btracey/subscriptions","organizations_url":"https://api.github.com/users/btracey/orgs","repos_url":"https://api.github.com/users/btracey/repos","events_url":"https://api.github.com/users/btracey/events{/privacy}","received_events_url":"https://api.github.com/users/btracey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-20T04:50:42Z","updated_at":"2015-08-09T14:32:23Z","closed_at":null,"body":"See discussion in #92 \r\n\r\nAt the moment, this is a problem throughout Dense and in Vector. \r\n\r\nWhen it is the same, new memory is allocated to avoid shadowing. This new data is used in place of the old matrix. There are two problems with the current approach\r\n1) (Relatively easy): In the code, there is no check that the receiver is the correct size. For example, if we have a.Mul(a, b), a is successfully overwritten even if b is not an nxn matrix. This is contrary to the current policy that sizes are only fungible when the matrix is zero.\r\n2) (Harder). This behavior also does not behave well with views. Instead of the new allocated memory replacing of the old data, in cases where a is a subset of a different matrix, the new data should be copied into the old locations. "},"comment":{"url":"https://api.github.com/repos/gonum/matrix/issues/comments/129191815","html_url":"https://github.com/gonum/matrix/issues/93#issuecomment-129191815","issue_url":"https://api.github.com/repos/gonum/matrix/issues/93","id":129191815,"user":{"login":"btracey","id":3680859,"avatar_url":"https://avatars.githubusercontent.com/u/3680859?v=3","gravatar_id":"","url":"https://api.github.com/users/btracey","html_url":"https://github.com/btracey","followers_url":"https://api.github.com/users/btracey/followers","following_url":"https://api.github.com/users/btracey/following{/other_user}","gists_url":"https://api.github.com/users/btracey/gists{/gist_id}","starred_url":"https://api.github.com/users/btracey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btracey/subscriptions","organizations_url":"https://api.github.com/users/btracey/orgs","repos_url":"https://api.github.com/users/btracey/repos","events_url":"https://api.github.com/users/btracey/events{/privacy}","received_events_url":"https://api.github.com/users/btracey/received_events","type":"User","site_admin":false},"created_at":"2015-08-09T14:32:23Z","updated_at":"2015-08-09T14:32:23Z","body":"Yes, although I don't know that it's been enacted everywhere. "}}