{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/234459236","pull_request_review_id":176103427,"id":234459236,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNDQ1OTIzNg==","diff_hunk":"@@ -1271,6 +1271,13 @@ def pairwise_distances_chunked(X, Y=None, reduce_func=None,\n             X_chunk = X[sl]\n         D_chunk = pairwise_distances(X_chunk, Y, metric=metric,\n                                      n_jobs=n_jobs, **kwds)\n+        if ((X is Y or Y is None)\n+                and PAIRWISE_DISTANCE_FUNCTIONS.get(metric, None)\n+                is euclidean_distances):\n+            # zeroing diagonal, taking care of aliases of \"euclidean\",\n+            # i.e. \"l2\"\n+            D_chunk[np.arange(D_chunk.shape[0]),\n+                    np.arange(D_chunk.shape[1])[sl]] = 0","path":"sklearn/metrics/pairwise.py","position":10,"original_position":10,"commit_id":"b7d82d7b0756f4869787ea848c2bbabb87bb522a","original_commit_id":"b7d82d7b0756f4869787ea848c2bbabb87bb522a","user":{"login":"amueller","id":449558,"node_id":"MDQ6VXNlcjQ0OTU1OA==","avatar_url":"https://avatars3.githubusercontent.com/u/449558?v=4","gravatar_id":"","url":"https://api.github.com/users/amueller","html_url":"https://github.com/amueller","followers_url":"https://api.github.com/users/amueller/followers","following_url":"https://api.github.com/users/amueller/following{/other_user}","gists_url":"https://api.github.com/users/amueller/gists{/gist_id}","starred_url":"https://api.github.com/users/amueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amueller/subscriptions","organizations_url":"https://api.github.com/users/amueller/orgs","repos_url":"https://api.github.com/users/amueller/repos","events_url":"https://api.github.com/users/amueller/events{/privacy}","received_events_url":"https://api.github.com/users/amueller/received_events","type":"User","site_admin":false},"body":"surely there's a better way to force inner indexing?","created_at":"2018-11-18T19:57:32Z","updated_at":"2018-11-18T19:57:32Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/12612#discussion_r234459236","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12612","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/234459236"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/12612#discussion_r234459236"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12612"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12612","id":231809288,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxODA5Mjg4","html_url":"https://github.com/scikit-learn/scikit-learn/pull/12612","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/12612.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/12612.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/12612","number":12612,"state":"open","locked":false,"title":"trying to set blockwise distance diagonals to zero","user":{"login":"amueller","id":449558,"node_id":"MDQ6VXNlcjQ0OTU1OA==","avatar_url":"https://avatars3.githubusercontent.com/u/449558?v=4","gravatar_id":"","url":"https://api.github.com/users/amueller","html_url":"https://github.com/amueller","followers_url":"https://api.github.com/users/amueller/followers","following_url":"https://api.github.com/users/amueller/following{/other_user}","gists_url":"https://api.github.com/users/amueller/gists{/gist_id}","starred_url":"https://api.github.com/users/amueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amueller/subscriptions","organizations_url":"https://api.github.com/users/amueller/orgs","repos_url":"https://api.github.com/users/amueller/repos","events_url":"https://api.github.com/users/amueller/events{/privacy}","received_events_url":"https://api.github.com/users/amueller/received_events","type":"User","site_admin":false},"body":"A shot at the discussion in #12574.\r\n\r\nThere's some error in the slicing and I have to run, though.","created_at":"2018-11-18T19:46:43Z","updated_at":"2018-11-18T19:57:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bdb5007e9fb32cba72b2c43114a34a3533796c2b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12612/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12612/comments","review_comment_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/12612/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/b7d82d7b0756f4869787ea848c2bbabb87bb522a","head":{"label":"amueller:chunked_distances_diagonal","ref":"chunked_distances_diagonal","sha":"b7d82d7b0756f4869787ea848c2bbabb87bb522a","user":{"login":"amueller","id":449558,"node_id":"MDQ6VXNlcjQ0OTU1OA==","avatar_url":"https://avatars3.githubusercontent.com/u/449558?v=4","gravatar_id":"","url":"https://api.github.com/users/amueller","html_url":"https://github.com/amueller","followers_url":"https://api.github.com/users/amueller/followers","following_url":"https://api.github.com/users/amueller/following{/other_user}","gists_url":"https://api.github.com/users/amueller/gists{/gist_id}","starred_url":"https://api.github.com/users/amueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amueller/subscriptions","organizations_url":"https://api.github.com/users/amueller/orgs","repos_url":"https://api.github.com/users/amueller/repos","events_url":"https://api.github.com/users/amueller/events{/privacy}","received_events_url":"https://api.github.com/users/amueller/received_events","type":"User","site_admin":false},"repo":{"id":1622872,"node_id":"MDEwOlJlcG9zaXRvcnkxNjIyODcy","name":"scikit-learn","full_name":"amueller/scikit-learn","private":false,"owner":{"login":"amueller","id":449558,"node_id":"MDQ6VXNlcjQ0OTU1OA==","avatar_url":"https://avatars3.githubusercontent.com/u/449558?v=4","gravatar_id":"","url":"https://api.github.com/users/amueller","html_url":"https://github.com/amueller","followers_url":"https://api.github.com/users/amueller/followers","following_url":"https://api.github.com/users/amueller/following{/other_user}","gists_url":"https://api.github.com/users/amueller/gists{/gist_id}","starred_url":"https://api.github.com/users/amueller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amueller/subscriptions","organizations_url":"https://api.github.com/users/amueller/orgs","repos_url":"https://api.github.com/users/amueller/repos","events_url":"https://api.github.com/users/amueller/events{/privacy}","received_events_url":"https://api.github.com/users/amueller/received_events","type":"User","site_admin":false},"html_url":"https://github.com/amueller/scikit-learn","description":"scikit-learn main repo","fork":true,"url":"https://api.github.com/repos/amueller/scikit-learn","forks_url":"https://api.github.com/repos/amueller/scikit-learn/forks","keys_url":"https://api.github.com/repos/amueller/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amueller/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amueller/scikit-learn/teams","hooks_url":"https://api.github.com/repos/amueller/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/amueller/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/amueller/scikit-learn/events","assignees_url":"https://api.github.com/repos/amueller/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/amueller/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/amueller/scikit-learn/tags","blobs_url":"https://api.github.com/repos/amueller/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amueller/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amueller/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/amueller/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amueller/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/amueller/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/amueller/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/amueller/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/amueller/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/amueller/scikit-learn/subscription","commits_url":"https://api.github.com/repos/amueller/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/amueller/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/amueller/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/amueller/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/amueller/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/amueller/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amueller/scikit-learn/merges","archive_url":"https://api.github.com/repos/amueller/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amueller/scikit-learn/downloads","issues_url":"https://api.github.com/repos/amueller/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/amueller/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/amueller/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/amueller/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amueller/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/amueller/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/amueller/scikit-learn/deployments","created_at":"2011-04-16T12:41:21Z","updated_at":"2018-11-01T02:53:15Z","pushed_at":"2018-11-18T19:53:36Z","git_url":"git://github.com/amueller/scikit-learn.git","ssh_url":"git@github.com:amueller/scikit-learn.git","clone_url":"https://github.com/amueller/scikit-learn.git","svn_url":"https://github.com/amueller/scikit-learn","homepage":"http://scikit-learn.sourceforge.net","size":98972,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":14,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":14,"open_issues":0,"watchers":11,"default_branch":"master"}},"base":{"label":"scikit-learn:master","ref":"master","sha":"82e095ce957913e1ff6a3f7214bbc65fedc2eccb","user":{"login":"scikit-learn","id":365630,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTYzMA==","avatar_url":"https://avatars2.githubusercontent.com/u/365630?v=4","gravatar_id":"","url":"https://api.github.com/users/scikit-learn","html_url":"https://github.com/scikit-learn","followers_url":"https://api.github.com/users/scikit-learn/followers","following_url":"https://api.github.com/users/scikit-learn/following{/other_user}","gists_url":"https://api.github.com/users/scikit-learn/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-learn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-learn/subscriptions","organizations_url":"https://api.github.com/users/scikit-learn/orgs","repos_url":"https://api.github.com/users/scikit-learn/repos","events_url":"https://api.github.com/users/scikit-learn/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-learn/received_events","type":"Organization","site_admin":false},"repo":{"id":843222,"node_id":"MDEwOlJlcG9zaXRvcnk4NDMyMjI=","name":"scikit-learn","full_name":"scikit-learn/scikit-learn","private":false,"owner":{"login":"scikit-learn","id":365630,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTYzMA==","avatar_url":"https://avatars2.githubusercontent.com/u/365630?v=4","gravatar_id":"","url":"https://api.github.com/users/scikit-learn","html_url":"https://github.com/scikit-learn","followers_url":"https://api.github.com/users/scikit-learn/followers","following_url":"https://api.github.com/users/scikit-learn/following{/other_user}","gists_url":"https://api.github.com/users/scikit-learn/gists{/gist_id}","starred_url":"https://api.github.com/users/scikit-learn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scikit-learn/subscriptions","organizations_url":"https://api.github.com/users/scikit-learn/orgs","repos_url":"https://api.github.com/users/scikit-learn/repos","events_url":"https://api.github.com/users/scikit-learn/events{/privacy}","received_events_url":"https://api.github.com/users/scikit-learn/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/scikit-learn/scikit-learn","description":"scikit-learn: machine learning in Python","fork":false,"url":"https://api.github.com/repos/scikit-learn/scikit-learn","forks_url":"https://api.github.com/repos/scikit-learn/scikit-learn/forks","keys_url":"https://api.github.com/repos/scikit-learn/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scikit-learn/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scikit-learn/scikit-learn/teams","hooks_url":"https://api.github.com/repos/scikit-learn/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/scikit-learn/scikit-learn/events","assignees_url":"https://api.github.com/repos/scikit-learn/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/scikit-learn/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/scikit-learn/scikit-learn/tags","blobs_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/scikit-learn/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/scikit-learn/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/scikit-learn/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/scikit-learn/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/scikit-learn/scikit-learn/subscription","commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/scikit-learn/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/scikit-learn/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scikit-learn/scikit-learn/merges","archive_url":"https://api.github.com/repos/scikit-learn/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scikit-learn/scikit-learn/downloads","issues_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/scikit-learn/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/scikit-learn/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/scikit-learn/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/deployments","created_at":"2010-08-17T09:43:38Z","updated_at":"2018-11-18T19:10:32Z","pushed_at":"2018-11-18T19:53:41Z","git_url":"git://github.com/scikit-learn/scikit-learn.git","ssh_url":"git@github.com:scikit-learn/scikit-learn.git","clone_url":"https://github.com/scikit-learn/scikit-learn.git","svn_url":"https://github.com/scikit-learn/scikit-learn","homepage":"http://scikit-learn.org","size":96724,"stargazers_count":31786,"watchers_count":31786,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":15698,"mirror_url":null,"archived":false,"open_issues_count":1809,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":15698,"open_issues":1809,"watchers":31786,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12612"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/12612"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/12612"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/12612/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12612/comments"},"review_comment":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/12612/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/b7d82d7b0756f4869787ea848c2bbabb87bb522a"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"amueller"}}