{"action":"closed","issue":{"url":"https://api.github.com/repos/mitodl/mitx-grading-library/issues/89","repository_url":"https://api.github.com/repos/mitodl/mitx-grading-library","labels_url":"https://api.github.com/repos/mitodl/mitx-grading-library/issues/89/labels{/name}","comments_url":"https://api.github.com/repos/mitodl/mitx-grading-library/issues/89/comments","events_url":"https://api.github.com/repos/mitodl/mitx-grading-library/issues/89/events","html_url":"https://github.com/mitodl/mitx-grading-library/issues/89","id":342109825,"node_id":"MDU6SXNzdWUzNDIxMDk4MjU=","number":89,"title":"Issue with row*column multiplication","user":{"login":"ChristopherChudzicki","id":9010790,"node_id":"MDQ6VXNlcjkwMTA3OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/9010790?v=4","gravatar_id":"","url":"https://api.github.com/users/ChristopherChudzicki","html_url":"https://github.com/ChristopherChudzicki","followers_url":"https://api.github.com/users/ChristopherChudzicki/followers","following_url":"https://api.github.com/users/ChristopherChudzicki/following{/other_user}","gists_url":"https://api.github.com/users/ChristopherChudzicki/gists{/gist_id}","starred_url":"https://api.github.com/users/ChristopherChudzicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChristopherChudzicki/subscriptions","organizations_url":"https://api.github.com/users/ChristopherChudzicki/orgs","repos_url":"https://api.github.com/users/ChristopherChudzicki/repos","events_url":"https://api.github.com/users/ChristopherChudzicki/events{/privacy}","received_events_url":"https://api.github.com/users/ChristopherChudzicki/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"ChristopherChudzicki","id":9010790,"node_id":"MDQ6VXNlcjkwMTA3OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/9010790?v=4","gravatar_id":"","url":"https://api.github.com/users/ChristopherChudzicki","html_url":"https://github.com/ChristopherChudzicki","followers_url":"https://api.github.com/users/ChristopherChudzicki/followers","following_url":"https://api.github.com/users/ChristopherChudzicki/following{/other_user}","gists_url":"https://api.github.com/users/ChristopherChudzicki/gists{/gist_id}","starred_url":"https://api.github.com/users/ChristopherChudzicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChristopherChudzicki/subscriptions","organizations_url":"https://api.github.com/users/ChristopherChudzicki/orgs","repos_url":"https://api.github.com/users/ChristopherChudzicki/repos","events_url":"https://api.github.com/users/ChristopherChudzicki/events{/privacy}","received_events_url":"https://api.github.com/users/ChristopherChudzicki/received_events","type":"User","site_admin":false},"assignees":[{"login":"ChristopherChudzicki","id":9010790,"node_id":"MDQ6VXNlcjkwMTA3OTA=","avatar_url":"https://avatars3.githubusercontent.com/u/9010790?v=4","gravatar_id":"","url":"https://api.github.com/users/ChristopherChudzicki","html_url":"https://github.com/ChristopherChudzicki","followers_url":"https://api.github.com/users/ChristopherChudzicki/followers","following_url":"https://api.github.com/users/ChristopherChudzicki/following{/other_user}","gists_url":"https://api.github.com/users/ChristopherChudzicki/gists{/gist_id}","starred_url":"https://api.github.com/users/ChristopherChudzicki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChristopherChudzicki/subscriptions","organizations_url":"https://api.github.com/users/ChristopherChudzicki/orgs","repos_url":"https://api.github.com/users/ChristopherChudzicki/repos","events_url":"https://api.github.com/users/ChristopherChudzicki/events{/privacy}","received_events_url":"https://api.github.com/users/ChristopherChudzicki/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-07-17T22:20:24Z","updated_at":"2018-07-18T20:22:43Z","closed_at":"2018-07-18T20:22:43Z","author_association":"COLLABORATOR","body":"MathArray multiplication behaves ... unexpectedly...for row/column vectors:\r\n\r\n```\r\na = MathArray([1, 2, 3]) # row: shape(1, 3)\r\nb = MathArray([[1], [2], [3]]) # column: shape (3, 1)\r\n\r\n(a*b).size # (1, 1)... a matrix with 1 row and 1 column\r\n(a*b)*b # raises a ShapeError since (1,1) * (3, 1) does not work.\r\n```\r\n\r\nRelevant: MathArray mostly uses `np.dot` for multiplication, the documentation for which is very good: https://docs.scipy.org/doc/numpy/reference/generated/numpy.dot.html (Note that the documentation is for v1.13, we use 1.6. But I don't think `dot` has changed. It references `matmul` as preferred over `dot`, which does not exist in 1.6)\r\n\r\nSuggested fix: MathArray's `__mul__` method has some checks to see if self or other has `ndim=0`. These checks should actually be self or size has `size=0`.\r\n\r\nDocumentation for numpy.ndarray.size: \r\n\r\nhttps://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.size.html"}}
{"actor":{"display_login":"jolyonb"}}