{"action":"opened","number":487,"pull_request":{"url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/pulls/487","id":221974609,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxOTc0NjA5","html_url":"https://github.com/rust-lang-nursery/rust-cookbook/pull/487","diff_url":"https://github.com/rust-lang-nursery/rust-cookbook/pull/487.diff","patch_url":"https://github.com/rust-lang-nursery/rust-cookbook/pull/487.patch","issue_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/issues/487","number":487,"state":"open","locked":false,"title":"Fix multiply-scalar-vector-matrix recipe","user":{"login":"jturner314","id":1836850,"node_id":"MDQ6VXNlcjE4MzY4NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/1836850?v=4","gravatar_id":"","url":"https://api.github.com/users/jturner314","html_url":"https://github.com/jturner314","followers_url":"https://api.github.com/users/jturner314/followers","following_url":"https://api.github.com/users/jturner314/following{/other_user}","gists_url":"https://api.github.com/users/jturner314/gists{/gist_id}","starred_url":"https://api.github.com/users/jturner314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jturner314/subscriptions","organizations_url":"https://api.github.com/users/jturner314/orgs","repos_url":"https://api.github.com/users/jturner314/repos","events_url":"https://api.github.com/users/jturner314/events{/privacy}","received_events_url":"https://api.github.com/users/jturner314/received_events","type":"User","site_admin":false},"body":"The original version was incorrect about `ndarray`'s treatment of 1-D arrays as vectors, and it incorrectly indicated that `*` performed matrix multiplication.\r\n\r\n`ndarray` decides whether a 1-D array is a row vector or column vector in matrix multiplication by whether it is on the left-hand side or right-hand side. (The behavior matches NumPy. If it's on the left-hand side, it's a row vector, while if it's on the right-hand side, it's a column vector.) The original version incorrectly indicated that calling `.reversed_axes()` on a 1-D array would make it into a column vector. In fact, calling `.reversed_axes()` on a 1-D array has no effect since a 1-D array has only 1 axis.\r\n\r\nMatrix multiplication is performed with `.dot()`, not `*`. The `*` operator performs element-wise multiplication.","created_at":"2018-10-11T00:46:08Z","updated_at":"2018-10-11T00:46:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/pulls/487/commits","review_comments_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/pulls/487/comments","review_comment_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/issues/487/comments","statuses_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/statuses/3cf656b4c9bad7d3c349a2a1b74851b85b568b1e","head":{"label":"jturner314:fix-multiply-scalar-vector-matrix","ref":"fix-multiply-scalar-vector-matrix","sha":"3cf656b4c9bad7d3c349a2a1b74851b85b568b1e","user":{"login":"jturner314","id":1836850,"node_id":"MDQ6VXNlcjE4MzY4NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/1836850?v=4","gravatar_id":"","url":"https://api.github.com/users/jturner314","html_url":"https://github.com/jturner314","followers_url":"https://api.github.com/users/jturner314/followers","following_url":"https://api.github.com/users/jturner314/following{/other_user}","gists_url":"https://api.github.com/users/jturner314/gists{/gist_id}","starred_url":"https://api.github.com/users/jturner314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jturner314/subscriptions","organizations_url":"https://api.github.com/users/jturner314/orgs","repos_url":"https://api.github.com/users/jturner314/repos","events_url":"https://api.github.com/users/jturner314/events{/privacy}","received_events_url":"https://api.github.com/users/jturner314/received_events","type":"User","site_admin":false},"repo":{"id":152004927,"node_id":"MDEwOlJlcG9zaXRvcnkxNTIwMDQ5Mjc=","name":"rust-cookbook","full_name":"jturner314/rust-cookbook","private":false,"owner":{"login":"jturner314","id":1836850,"node_id":"MDQ6VXNlcjE4MzY4NTA=","avatar_url":"https://avatars1.githubusercontent.com/u/1836850?v=4","gravatar_id":"","url":"https://api.github.com/users/jturner314","html_url":"https://github.com/jturner314","followers_url":"https://api.github.com/users/jturner314/followers","following_url":"https://api.github.com/users/jturner314/following{/other_user}","gists_url":"https://api.github.com/users/jturner314/gists{/gist_id}","starred_url":"https://api.github.com/users/jturner314/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jturner314/subscriptions","organizations_url":"https://api.github.com/users/jturner314/orgs","repos_url":"https://api.github.com/users/jturner314/repos","events_url":"https://api.github.com/users/jturner314/events{/privacy}","received_events_url":"https://api.github.com/users/jturner314/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jturner314/rust-cookbook","description":"https://rust-lang-nursery.github.io/rust-cookbook","fork":true,"url":"https://api.github.com/repos/jturner314/rust-cookbook","forks_url":"https://api.github.com/repos/jturner314/rust-cookbook/forks","keys_url":"https://api.github.com/repos/jturner314/rust-cookbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jturner314/rust-cookbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jturner314/rust-cookbook/teams","hooks_url":"https://api.github.com/repos/jturner314/rust-cookbook/hooks","issue_events_url":"https://api.github.com/repos/jturner314/rust-cookbook/issues/events{/number}","events_url":"https://api.github.com/repos/jturner314/rust-cookbook/events","assignees_url":"https://api.github.com/repos/jturner314/rust-cookbook/assignees{/user}","branches_url":"https://api.github.com/repos/jturner314/rust-cookbook/branches{/branch}","tags_url":"https://api.github.com/repos/jturner314/rust-cookbook/tags","blobs_url":"https://api.github.com/repos/jturner314/rust-cookbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jturner314/rust-cookbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jturner314/rust-cookbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/jturner314/rust-cookbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jturner314/rust-cookbook/statuses/{sha}","languages_url":"https://api.github.com/repos/jturner314/rust-cookbook/languages","stargazers_url":"https://api.github.com/repos/jturner314/rust-cookbook/stargazers","contributors_url":"https://api.github.com/repos/jturner314/rust-cookbook/contributors","subscribers_url":"https://api.github.com/repos/jturner314/rust-cookbook/subscribers","subscription_url":"https://api.github.com/repos/jturner314/rust-cookbook/subscription","commits_url":"https://api.github.com/repos/jturner314/rust-cookbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/jturner314/rust-cookbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/jturner314/rust-cookbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/jturner314/rust-cookbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/jturner314/rust-cookbook/contents/{+path}","compare_url":"https://api.github.com/repos/jturner314/rust-cookbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jturner314/rust-cookbook/merges","archive_url":"https://api.github.com/repos/jturner314/rust-cookbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jturner314/rust-cookbook/downloads","issues_url":"https://api.github.com/repos/jturner314/rust-cookbook/issues{/number}","pulls_url":"https://api.github.com/repos/jturner314/rust-cookbook/pulls{/number}","milestones_url":"https://api.github.com/repos/jturner314/rust-cookbook/milestones{/number}","notifications_url":"https://api.github.com/repos/jturner314/rust-cookbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jturner314/rust-cookbook/labels{/name}","releases_url":"https://api.github.com/repos/jturner314/rust-cookbook/releases{/id}","deployments_url":"https://api.github.com/repos/jturner314/rust-cookbook/deployments","created_at":"2018-10-08T02:02:52Z","updated_at":"2018-10-08T02:02:55Z","pushed_at":"2018-10-11T00:45:28Z","git_url":"git://github.com/jturner314/rust-cookbook.git","ssh_url":"git@github.com:jturner314/rust-cookbook.git","clone_url":"https://github.com/jturner314/rust-cookbook.git","svn_url":"https://github.com/jturner314/rust-cookbook","homepage":"","size":1883,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"cc0-1.0","name":"Creative Commons Zero v1.0 Universal","spdx_id":"CC0-1.0","url":"https://api.github.com/licenses/cc0-1.0","node_id":"MDc6TGljZW5zZTY="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rust-lang-nursery:master","ref":"master","sha":"5d3f4a1e76c589c6d9c20b1cf55b104461cd09b5","user":{"login":"rust-lang-nursery","id":14631425,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0NjMxNDI1","avatar_url":"https://avatars1.githubusercontent.com/u/14631425?v=4","gravatar_id":"","url":"https://api.github.com/users/rust-lang-nursery","html_url":"https://github.com/rust-lang-nursery","followers_url":"https://api.github.com/users/rust-lang-nursery/followers","following_url":"https://api.github.com/users/rust-lang-nursery/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang-nursery/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang-nursery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang-nursery/subscriptions","organizations_url":"https://api.github.com/users/rust-lang-nursery/orgs","repos_url":"https://api.github.com/users/rust-lang-nursery/repos","events_url":"https://api.github.com/users/rust-lang-nursery/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang-nursery/received_events","type":"Organization","site_admin":false},"repo":{"id":82722984,"node_id":"MDEwOlJlcG9zaXRvcnk4MjcyMjk4NA==","name":"rust-cookbook","full_name":"rust-lang-nursery/rust-cookbook","private":false,"owner":{"login":"rust-lang-nursery","id":14631425,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0NjMxNDI1","avatar_url":"https://avatars1.githubusercontent.com/u/14631425?v=4","gravatar_id":"","url":"https://api.github.com/users/rust-lang-nursery","html_url":"https://github.com/rust-lang-nursery","followers_url":"https://api.github.com/users/rust-lang-nursery/followers","following_url":"https://api.github.com/users/rust-lang-nursery/following{/other_user}","gists_url":"https://api.github.com/users/rust-lang-nursery/gists{/gist_id}","starred_url":"https://api.github.com/users/rust-lang-nursery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rust-lang-nursery/subscriptions","organizations_url":"https://api.github.com/users/rust-lang-nursery/orgs","repos_url":"https://api.github.com/users/rust-lang-nursery/repos","events_url":"https://api.github.com/users/rust-lang-nursery/events{/privacy}","received_events_url":"https://api.github.com/users/rust-lang-nursery/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/rust-lang-nursery/rust-cookbook","description":"https://rust-lang-nursery.github.io/rust-cookbook","fork":false,"url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook","forks_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/forks","keys_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/teams","hooks_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/hooks","issue_events_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/issues/events{/number}","events_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/events","assignees_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/assignees{/user}","branches_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/branches{/branch}","tags_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/tags","blobs_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/statuses/{sha}","languages_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/languages","stargazers_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/stargazers","contributors_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/contributors","subscribers_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/subscribers","subscription_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/subscription","commits_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/contents/{+path}","compare_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/merges","archive_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/downloads","issues_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/issues{/number}","pulls_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/pulls{/number}","milestones_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/milestones{/number}","notifications_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/labels{/name}","releases_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/releases{/id}","deployments_url":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/deployments","created_at":"2017-02-21T20:17:58Z","updated_at":"2018-10-10T22:35:56Z","pushed_at":"2018-10-10T23:55:14Z","git_url":"git://github.com/rust-lang-nursery/rust-cookbook.git","ssh_url":"git@github.com:rust-lang-nursery/rust-cookbook.git","clone_url":"https://github.com/rust-lang-nursery/rust-cookbook.git","svn_url":"https://github.com/rust-lang-nursery/rust-cookbook","homepage":"","size":1800,"stargazers_count":630,"watchers_count":630,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":128,"mirror_url":null,"archived":false,"open_issues_count":48,"license":{"key":"cc0-1.0","name":"Creative Commons Zero v1.0 Universal","spdx_id":"CC0-1.0","url":"https://api.github.com/licenses/cc0-1.0","node_id":"MDc6TGljZW5zZTY="},"forks":128,"open_issues":48,"watchers":630,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/pulls/487"},"html":{"href":"https://github.com/rust-lang-nursery/rust-cookbook/pull/487"},"issue":{"href":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/issues/487"},"comments":{"href":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/issues/487/comments"},"review_comments":{"href":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/pulls/487/comments"},"review_comment":{"href":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/pulls/487/commits"},"statuses":{"href":"https://api.github.com/repos/rust-lang-nursery/rust-cookbook/statuses/3cf656b4c9bad7d3c349a2a1b74851b85b568b1e"}},"author_association":"NONE","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":11,"deletions":3,"changed_files":1}}
{"actor":{"display_login":"jturner314"}}