{"action":"created","comment":{"url":"https://api.github.com/repos/scipy/scipy/pulls/comments/41698732","id":41698732,"diff_hunk":"@@ -44,7 +47,7 @@ def givens_elimination(double [:, ::1] S, double [:] v, double [:] diag):\n         if diag[i] == 0:\n             continue\n \n-        diag_row[:] = 0\n+        diag_row[i+1:] = 0","path":"scipy/optimize/_lsq/givens_elimination.pyx","position":27,"original_position":27,"commit_id":"fb9cea3a5df31bb32c758155fab987c8d0b04284","original_commit_id":"fb9cea3a5df31bb32c758155fab987c8d0b04284","user":{"login":"rgommers","id":98330,"avatar_url":"https://avatars.githubusercontent.com/u/98330?v=3","gravatar_id":"","url":"https://api.github.com/users/rgommers","html_url":"https://github.com/rgommers","followers_url":"https://api.github.com/users/rgommers/followers","following_url":"https://api.github.com/users/rgommers/following{/other_user}","gists_url":"https://api.github.com/users/rgommers/gists{/gist_id}","starred_url":"https://api.github.com/users/rgommers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgommers/subscriptions","organizations_url":"https://api.github.com/users/rgommers/orgs","repos_url":"https://api.github.com/users/rgommers/repos","events_url":"https://api.github.com/users/rgommers/events{/privacy}","received_events_url":"https://api.github.com/users/rgommers/received_events","type":"User","site_admin":false},"body":"> >    The new and old code are only equivalent is diag_row[i] really is reset to 0\r\n\r\n> Can you explain why it seems to you like this? Maybe I'm missing something.\r\n\r\nProbably because I'm reading too fast, but the current code does:\r\n\r\n    diag_row[:] = 0\r\n    diag_row[i] = diag[i]\r\n\r\nin each iteration, so will contain ``[0, 0, 0, 0.23432, 0, 0, 0]`` (for ``i==3``). The new code only resets elements ``i+1:``, so (for ``n==4``) could contain ``[0.11, 0.22, 0.33, 0.23432, 0, 0, 0]``.\r\n\r\nThe above isn't true if the comment about implicit 0 really resets element ``j`` to identically 0, which I didn't verify.","created_at":"2015-10-10T16:25:31Z","updated_at":"2015-10-10T16:25:31Z","html_url":"https://github.com/scipy/scipy/pull/5319#discussion_r41698732","pull_request_url":"https://api.github.com/repos/scipy/scipy/pulls/5319","_links":{"self":{"href":"https://api.github.com/repos/scipy/scipy/pulls/comments/41698732"},"html":{"href":"https://github.com/scipy/scipy/pull/5319#discussion_r41698732"},"pull_request":{"href":"https://api.github.com/repos/scipy/scipy/pulls/5319"}}},"pull_request":{"url":"https://api.github.com/repos/scipy/scipy/pulls/5319","id":46946824,"html_url":"https://github.com/scipy/scipy/pull/5319","diff_url":"https://github.com/scipy/scipy/pull/5319.diff","patch_url":"https://github.com/scipy/scipy/pull/5319.patch","issue_url":"https://api.github.com/repos/scipy/scipy/issues/5319","number":5319,"state":"open","locked":false,"title":"MAINT: Cython code maintenance","user":{"login":"larsmans","id":335383,"avatar_url":"https://avatars.githubusercontent.com/u/335383?v=3","gravatar_id":"","url":"https://api.github.com/users/larsmans","html_url":"https://github.com/larsmans","followers_url":"https://api.github.com/users/larsmans/followers","following_url":"https://api.github.com/users/larsmans/following{/other_user}","gists_url":"https://api.github.com/users/larsmans/gists{/gist_id}","starred_url":"https://api.github.com/users/larsmans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsmans/subscriptions","organizations_url":"https://api.github.com/users/larsmans/orgs","repos_url":"https://api.github.com/users/larsmans/repos","events_url":"https://api.github.com/users/larsmans/events{/privacy}","received_events_url":"https://api.github.com/users/larsmans/received_events","type":"User","site_admin":false},"body":"Optimizing the Cython code for size and fixing buglets along the way. Should reduce the installation footprint by at least a few hundred kB and give some marginal speedups.","created_at":"2015-10-06T19:31:07Z","updated_at":"2015-10-10T16:25:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d8b9d7a05bfb263a7c36457d14695a19b941cfd4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scipy/scipy/pulls/5319/commits","review_comments_url":"https://api.github.com/repos/scipy/scipy/pulls/5319/comments","review_comment_url":"https://api.github.com/repos/scipy/scipy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/5319/comments","statuses_url":"https://api.github.com/repos/scipy/scipy/statuses/fb9cea3a5df31bb32c758155fab987c8d0b04284","head":{"label":"larsmans:cython-maint","ref":"cython-maint","sha":"fb9cea3a5df31bb32c758155fab987c8d0b04284","user":{"login":"larsmans","id":335383,"avatar_url":"https://avatars.githubusercontent.com/u/335383?v=3","gravatar_id":"","url":"https://api.github.com/users/larsmans","html_url":"https://github.com/larsmans","followers_url":"https://api.github.com/users/larsmans/followers","following_url":"https://api.github.com/users/larsmans/following{/other_user}","gists_url":"https://api.github.com/users/larsmans/gists{/gist_id}","starred_url":"https://api.github.com/users/larsmans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsmans/subscriptions","organizations_url":"https://api.github.com/users/larsmans/orgs","repos_url":"https://api.github.com/users/larsmans/repos","events_url":"https://api.github.com/users/larsmans/events{/privacy}","received_events_url":"https://api.github.com/users/larsmans/received_events","type":"User","site_admin":false},"repo":{"id":2077644,"name":"scipy","full_name":"larsmans/scipy","owner":{"login":"larsmans","id":335383,"avatar_url":"https://avatars.githubusercontent.com/u/335383?v=3","gravatar_id":"","url":"https://api.github.com/users/larsmans","html_url":"https://github.com/larsmans","followers_url":"https://api.github.com/users/larsmans/followers","following_url":"https://api.github.com/users/larsmans/following{/other_user}","gists_url":"https://api.github.com/users/larsmans/gists{/gist_id}","starred_url":"https://api.github.com/users/larsmans/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larsmans/subscriptions","organizations_url":"https://api.github.com/users/larsmans/orgs","repos_url":"https://api.github.com/users/larsmans/repos","events_url":"https://api.github.com/users/larsmans/events{/privacy}","received_events_url":"https://api.github.com/users/larsmans/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/larsmans/scipy","description":"Clone of Scipy main repository","fork":true,"url":"https://api.github.com/repos/larsmans/scipy","forks_url":"https://api.github.com/repos/larsmans/scipy/forks","keys_url":"https://api.github.com/repos/larsmans/scipy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/larsmans/scipy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/larsmans/scipy/teams","hooks_url":"https://api.github.com/repos/larsmans/scipy/hooks","issue_events_url":"https://api.github.com/repos/larsmans/scipy/issues/events{/number}","events_url":"https://api.github.com/repos/larsmans/scipy/events","assignees_url":"https://api.github.com/repos/larsmans/scipy/assignees{/user}","branches_url":"https://api.github.com/repos/larsmans/scipy/branches{/branch}","tags_url":"https://api.github.com/repos/larsmans/scipy/tags","blobs_url":"https://api.github.com/repos/larsmans/scipy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/larsmans/scipy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/larsmans/scipy/git/refs{/sha}","trees_url":"https://api.github.com/repos/larsmans/scipy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/larsmans/scipy/statuses/{sha}","languages_url":"https://api.github.com/repos/larsmans/scipy/languages","stargazers_url":"https://api.github.com/repos/larsmans/scipy/stargazers","contributors_url":"https://api.github.com/repos/larsmans/scipy/contributors","subscribers_url":"https://api.github.com/repos/larsmans/scipy/subscribers","subscription_url":"https://api.github.com/repos/larsmans/scipy/subscription","commits_url":"https://api.github.com/repos/larsmans/scipy/commits{/sha}","git_commits_url":"https://api.github.com/repos/larsmans/scipy/git/commits{/sha}","comments_url":"https://api.github.com/repos/larsmans/scipy/comments{/number}","issue_comment_url":"https://api.github.com/repos/larsmans/scipy/issues/comments{/number}","contents_url":"https://api.github.com/repos/larsmans/scipy/contents/{+path}","compare_url":"https://api.github.com/repos/larsmans/scipy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/larsmans/scipy/merges","archive_url":"https://api.github.com/repos/larsmans/scipy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/larsmans/scipy/downloads","issues_url":"https://api.github.com/repos/larsmans/scipy/issues{/number}","pulls_url":"https://api.github.com/repos/larsmans/scipy/pulls{/number}","milestones_url":"https://api.github.com/repos/larsmans/scipy/milestones{/number}","notifications_url":"https://api.github.com/repos/larsmans/scipy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/larsmans/scipy/labels{/name}","releases_url":"https://api.github.com/repos/larsmans/scipy/releases{/id}","created_at":"2011-07-20T11:36:00Z","updated_at":"2014-09-01T12:53:59Z","pushed_at":"2015-10-07T10:26:00Z","git_url":"git://github.com/larsmans/scipy.git","ssh_url":"git@github.com:larsmans/scipy.git","clone_url":"https://github.com/larsmans/scipy.git","svn_url":"https://github.com/larsmans/scipy","homepage":"http://scipy.org/","size":58274,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"scipy:master","ref":"master","sha":"48048e7442203b588410a150b582cadfc699b7bc","user":{"login":"scipy","id":288277,"avatar_url":"https://avatars.githubusercontent.com/u/288277?v=3","gravatar_id":"","url":"https://api.github.com/users/scipy","html_url":"https://github.com/scipy","followers_url":"https://api.github.com/users/scipy/followers","following_url":"https://api.github.com/users/scipy/following{/other_user}","gists_url":"https://api.github.com/users/scipy/gists{/gist_id}","starred_url":"https://api.github.com/users/scipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scipy/subscriptions","organizations_url":"https://api.github.com/users/scipy/orgs","repos_url":"https://api.github.com/users/scipy/repos","events_url":"https://api.github.com/users/scipy/events{/privacy}","received_events_url":"https://api.github.com/users/scipy/received_events","type":"Organization","site_admin":false},"repo":{"id":1460385,"name":"scipy","full_name":"scipy/scipy","owner":{"login":"scipy","id":288277,"avatar_url":"https://avatars.githubusercontent.com/u/288277?v=3","gravatar_id":"","url":"https://api.github.com/users/scipy","html_url":"https://github.com/scipy","followers_url":"https://api.github.com/users/scipy/followers","following_url":"https://api.github.com/users/scipy/following{/other_user}","gists_url":"https://api.github.com/users/scipy/gists{/gist_id}","starred_url":"https://api.github.com/users/scipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scipy/subscriptions","organizations_url":"https://api.github.com/users/scipy/orgs","repos_url":"https://api.github.com/users/scipy/repos","events_url":"https://api.github.com/users/scipy/events{/privacy}","received_events_url":"https://api.github.com/users/scipy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scipy/scipy","description":"Scipy library main repository","fork":false,"url":"https://api.github.com/repos/scipy/scipy","forks_url":"https://api.github.com/repos/scipy/scipy/forks","keys_url":"https://api.github.com/repos/scipy/scipy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scipy/scipy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scipy/scipy/teams","hooks_url":"https://api.github.com/repos/scipy/scipy/hooks","issue_events_url":"https://api.github.com/repos/scipy/scipy/issues/events{/number}","events_url":"https://api.github.com/repos/scipy/scipy/events","assignees_url":"https://api.github.com/repos/scipy/scipy/assignees{/user}","branches_url":"https://api.github.com/repos/scipy/scipy/branches{/branch}","tags_url":"https://api.github.com/repos/scipy/scipy/tags","blobs_url":"https://api.github.com/repos/scipy/scipy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scipy/scipy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scipy/scipy/git/refs{/sha}","trees_url":"https://api.github.com/repos/scipy/scipy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scipy/scipy/statuses/{sha}","languages_url":"https://api.github.com/repos/scipy/scipy/languages","stargazers_url":"https://api.github.com/repos/scipy/scipy/stargazers","contributors_url":"https://api.github.com/repos/scipy/scipy/contributors","subscribers_url":"https://api.github.com/repos/scipy/scipy/subscribers","subscription_url":"https://api.github.com/repos/scipy/scipy/subscription","commits_url":"https://api.github.com/repos/scipy/scipy/commits{/sha}","git_commits_url":"https://api.github.com/repos/scipy/scipy/git/commits{/sha}","comments_url":"https://api.github.com/repos/scipy/scipy/comments{/number}","issue_comment_url":"https://api.github.com/repos/scipy/scipy/issues/comments{/number}","contents_url":"https://api.github.com/repos/scipy/scipy/contents/{+path}","compare_url":"https://api.github.com/repos/scipy/scipy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scipy/scipy/merges","archive_url":"https://api.github.com/repos/scipy/scipy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scipy/scipy/downloads","issues_url":"https://api.github.com/repos/scipy/scipy/issues{/number}","pulls_url":"https://api.github.com/repos/scipy/scipy/pulls{/number}","milestones_url":"https://api.github.com/repos/scipy/scipy/milestones{/number}","notifications_url":"https://api.github.com/repos/scipy/scipy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scipy/scipy/labels{/name}","releases_url":"https://api.github.com/repos/scipy/scipy/releases{/id}","created_at":"2011-03-09T18:52:03Z","updated_at":"2015-10-10T15:44:44Z","pushed_at":"2015-10-10T16:12:30Z","git_url":"git://github.com/scipy/scipy.git","ssh_url":"git@github.com:scipy/scipy.git","clone_url":"https://github.com/scipy/scipy.git","svn_url":"https://github.com/scipy/scipy","homepage":"http://scipy.org/scipylib/","size":92704,"stargazers_count":1868,"watchers_count":1868,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1050,"mirror_url":null,"open_issues_count":919,"forks":1050,"open_issues":919,"watchers":1868,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scipy/scipy/pulls/5319"},"html":{"href":"https://github.com/scipy/scipy/pull/5319"},"issue":{"href":"https://api.github.com/repos/scipy/scipy/issues/5319"},"comments":{"href":"https://api.github.com/repos/scipy/scipy/issues/5319/comments"},"review_comments":{"href":"https://api.github.com/repos/scipy/scipy/pulls/5319/comments"},"review_comment":{"href":"https://api.github.com/repos/scipy/scipy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scipy/scipy/pulls/5319/commits"},"statuses":{"href":"https://api.github.com/repos/scipy/scipy/statuses/fb9cea3a5df31bb32c758155fab987c8d0b04284"}}}}