{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/84292584","pull_request_review_id":5078712,"id":84292584,"diff_hunk":"@@ -28,8 +27,7 @@ def _generate_hypercube(samples, dimensions, rng):\n     if dimensions > 30:\n         return np.hstack([_generate_hypercube(samples, dimensions - 30, rng),\n                           _generate_hypercube(samples, 30, rng)])\n-    out = astype(sample_without_replacement(2 ** dimensions, samples,\n-                                            random_state=rng),\n+    out = astype(random_state.permutation(2 ** dimensions)[:samples],","path":"sklearn/datasets/samples_generator.py","position":14,"original_position":14,"commit_id":"f94c8680cb9a59aa0d2aa6246e62bb12ceeb0370","original_commit_id":"f94c8680cb9a59aa0d2aa6246e62bb12ceeb0370","user":{"login":"amueller","id":449558,"avatar_url":"https://avatars.githubusercontent.com/u/449558?v=3","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":"I highly recommend using an editor that supports pyflakes or flake8 to catch this sort of error while writing the code.","created_at":"2016-10-20T14:18:51Z","updated_at":"2016-10-20T14:18:55Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/7703#discussion_r84292584","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7703","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/84292584"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/7703#discussion_r84292584"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7703"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7703","id":89944576,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/7703","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/7703.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/7703.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7703","number":7703,"state":"open","locked":false,"title":"[WIP] Fix sample_without_replacement speed issue","user":{"login":"jkarno","id":5368880,"avatar_url":"https://avatars.githubusercontent.com/u/5368880?v=3","gravatar_id":"","url":"https://api.github.com/users/jkarno","html_url":"https://github.com/jkarno","followers_url":"https://api.github.com/users/jkarno/followers","following_url":"https://api.github.com/users/jkarno/following{/other_user}","gists_url":"https://api.github.com/users/jkarno/gists{/gist_id}","starred_url":"https://api.github.com/users/jkarno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkarno/subscriptions","organizations_url":"https://api.github.com/users/jkarno/orgs","repos_url":"https://api.github.com/users/jkarno/repos","events_url":"https://api.github.com/users/jkarno/events{/privacy}","received_events_url":"https://api.github.com/users/jkarno/received_events","type":"User","site_admin":false},"body":"#### Reference Issue\r\nFixes #7091 \r\n\r\n\r\n#### What does this implement/fix? Explain your changes.\r\nThis replaces all calls to sample_without_replacement with an np.permutation call, as per discussion in issue thread.\r\n\r\n#### Any other comments?\r\n1. Running the tests, this doesn't currently seem to pass but I'm not exactly sure what I'm misunderstanding. Does it have to do with seeding on the random states or otherwise incorporating the random variables?\r\n\r\n2. Should I remove the files implementing sample_without_replacement, or is does this fix just involve replacing the existing calls with np.permutation?\r\n","created_at":"2016-10-19T05:33:50Z","updated_at":"2016-10-20T14:18:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"43979b44c09674d3829c4a793b97f6e646f18771","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/milestones/22","html_url":"https://github.com/scikit-learn/scikit-learn/milestones/0.18.1","labels_url":"https://api.github.com/repos/scikit-learn/scikit-learn/milestones/22/labels","id":2046567,"number":22,"title":"0.18.1","description":"Urgent fixes to bugs and web site issues.","creator":{"login":"jnothman","id":78827,"avatar_url":"https://avatars.githubusercontent.com/u/78827?v=3","gravatar_id":"","url":"https://api.github.com/users/jnothman","html_url":"https://github.com/jnothman","followers_url":"https://api.github.com/users/jnothman/followers","following_url":"https://api.github.com/users/jnothman/following{/other_user}","gists_url":"https://api.github.com/users/jnothman/gists{/gist_id}","starred_url":"https://api.github.com/users/jnothman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jnothman/subscriptions","organizations_url":"https://api.github.com/users/jnothman/orgs","repos_url":"https://api.github.com/users/jnothman/repos","events_url":"https://api.github.com/users/jnothman/events{/privacy}","received_events_url":"https://api.github.com/users/jnothman/received_events","type":"User","site_admin":false},"open_issues":23,"closed_issues":22,"state":"open","created_at":"2016-10-04T11:55:58Z","updated_at":"2016-10-20T05:44:11Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7703/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7703/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/7703/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/f94c8680cb9a59aa0d2aa6246e62bb12ceeb0370","head":{"label":"jkarno:sample-without-replacement-speed-fix","ref":"sample-without-replacement-speed-fix","sha":"f94c8680cb9a59aa0d2aa6246e62bb12ceeb0370","user":{"login":"jkarno","id":5368880,"avatar_url":"https://avatars.githubusercontent.com/u/5368880?v=3","gravatar_id":"","url":"https://api.github.com/users/jkarno","html_url":"https://github.com/jkarno","followers_url":"https://api.github.com/users/jkarno/followers","following_url":"https://api.github.com/users/jkarno/following{/other_user}","gists_url":"https://api.github.com/users/jkarno/gists{/gist_id}","starred_url":"https://api.github.com/users/jkarno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkarno/subscriptions","organizations_url":"https://api.github.com/users/jkarno/orgs","repos_url":"https://api.github.com/users/jkarno/repos","events_url":"https://api.github.com/users/jkarno/events{/privacy}","received_events_url":"https://api.github.com/users/jkarno/received_events","type":"User","site_admin":false},"repo":{"id":68325315,"name":"scikit-learn","full_name":"jkarno/scikit-learn","owner":{"login":"jkarno","id":5368880,"avatar_url":"https://avatars.githubusercontent.com/u/5368880?v=3","gravatar_id":"","url":"https://api.github.com/users/jkarno","html_url":"https://github.com/jkarno","followers_url":"https://api.github.com/users/jkarno/followers","following_url":"https://api.github.com/users/jkarno/following{/other_user}","gists_url":"https://api.github.com/users/jkarno/gists{/gist_id}","starred_url":"https://api.github.com/users/jkarno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkarno/subscriptions","organizations_url":"https://api.github.com/users/jkarno/orgs","repos_url":"https://api.github.com/users/jkarno/repos","events_url":"https://api.github.com/users/jkarno/events{/privacy}","received_events_url":"https://api.github.com/users/jkarno/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jkarno/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/jkarno/scikit-learn","forks_url":"https://api.github.com/repos/jkarno/scikit-learn/forks","keys_url":"https://api.github.com/repos/jkarno/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jkarno/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jkarno/scikit-learn/teams","hooks_url":"https://api.github.com/repos/jkarno/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/jkarno/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/jkarno/scikit-learn/events","assignees_url":"https://api.github.com/repos/jkarno/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/jkarno/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/jkarno/scikit-learn/tags","blobs_url":"https://api.github.com/repos/jkarno/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jkarno/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jkarno/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/jkarno/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jkarno/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/jkarno/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/jkarno/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/jkarno/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/jkarno/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/jkarno/scikit-learn/subscription","commits_url":"https://api.github.com/repos/jkarno/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/jkarno/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/jkarno/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/jkarno/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/jkarno/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/jkarno/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jkarno/scikit-learn/merges","archive_url":"https://api.github.com/repos/jkarno/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jkarno/scikit-learn/downloads","issues_url":"https://api.github.com/repos/jkarno/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/jkarno/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/jkarno/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/jkarno/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jkarno/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/jkarno/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/jkarno/scikit-learn/deployments","created_at":"2016-09-15T19:37:39Z","updated_at":"2016-09-15T19:37:47Z","pushed_at":"2016-10-20T04:46:37Z","git_url":"git://github.com/jkarno/scikit-learn.git","ssh_url":"git@github.com:jkarno/scikit-learn.git","clone_url":"https://github.com/jkarno/scikit-learn.git","svn_url":"https://github.com/jkarno/scikit-learn","homepage":"http://scikit-learn.org","size":75713,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"scikit-learn:master","ref":"master","sha":"647b7c1de5f48063f0f7370f10f8214077f953ec","user":{"login":"scikit-learn","id":365630,"avatar_url":"https://avatars.githubusercontent.com/u/365630?v=3","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,"name":"scikit-learn","full_name":"scikit-learn/scikit-learn","owner":{"login":"scikit-learn","id":365630,"avatar_url":"https://avatars.githubusercontent.com/u/365630?v=3","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},"private":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":"2016-10-20T13:15:34Z","pushed_at":"2016-10-20T14:11:29Z","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":126429,"stargazers_count":14178,"watchers_count":14178,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8073,"mirror_url":null,"open_issues_count":1177,"forks":8073,"open_issues":1177,"watchers":14178,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7703"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/7703"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7703"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7703/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7703/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/7703/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/f94c8680cb9a59aa0d2aa6246e62bb12ceeb0370"}}}}
{"actor":{"display_login":"amueller"}}