{"action":"created","comment":{"url":"https://api.github.com/repos/PyMVPA/PyMVPA/pulls/comments/75874695","id":75874695,"diff_hunk":"@@ -221,6 +241,24 @@ def test_balancer():\n     # now use it as a generator\n     dses = list(bal.generate(ds))\n     assert_equal(len(dses), 5)\n+\n+    # if we rerun again, it would be a different selection\n+    res2 = bal(ds)\n+    assert_true(np.any(res.sa.ids != bal(ds).sa.ids))\n+\n+    # but if we create a balancer providing seed rng int,\n+    # should be identical results\n+    bal = Balancer(apply_selection=True, count=5, rng=1)\n+    assert_false(np.any(bal(ds).sa.ids != bal(ds).sa.ids))\n+\n+    # But results should differ if we use .generate to produce those multiple\n+    # balanced datasets\n+    b = Balancer(apply_selection=True, count=3, rng=1)\n+    balanced = list(b.generate(ds))\n+    assert_false(all(balanced[0].sa.ids == balanced[1].sa.ids))\n+    assert_false(all(balanced[0].sa.ids == balanced[2].sa.ids))\n+    assert_false(all(balanced[1].sa.ids == balanced[2].sa.ids))","path":"mvpa2/tests/test_generators.py","position":83,"original_position":83,"commit_id":"7edc534e6374fffa82b8bebe5bc2da5119c582a5","original_commit_id":"7edc534e6374fffa82b8bebe5bc2da5119c582a5","user":{"login":"yarikoptic","id":39889,"avatar_url":"https://avatars.githubusercontent.com/u/39889?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikoptic","html_url":"https://github.com/yarikoptic","followers_url":"https://api.github.com/users/yarikoptic/followers","following_url":"https://api.github.com/users/yarikoptic/following{/other_user}","gists_url":"https://api.github.com/users/yarikoptic/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikoptic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikoptic/subscriptions","organizations_url":"https://api.github.com/users/yarikoptic/orgs","repos_url":"https://api.github.com/users/yarikoptic/repos","events_url":"https://api.github.com/users/yarikoptic/events{/privacy}","received_events_url":"https://api.github.com/users/yarikoptic/received_events","type":"User","site_admin":false},"body":"done, pushed. THANKS!","created_at":"2016-08-23T14:16:04Z","updated_at":"2016-08-23T14:16:04Z","html_url":"https://github.com/PyMVPA/PyMVPA/pull/493#discussion_r75874695","pull_request_url":"https://api.github.com/repos/PyMVPA/PyMVPA/pulls/493","_links":{"self":{"href":"https://api.github.com/repos/PyMVPA/PyMVPA/pulls/comments/75874695"},"html":{"href":"https://github.com/PyMVPA/PyMVPA/pull/493#discussion_r75874695"},"pull_request":{"href":"https://api.github.com/repos/PyMVPA/PyMVPA/pulls/493"}}},"pull_request":{"url":"https://api.github.com/repos/PyMVPA/PyMVPA/pulls/493","id":82274378,"html_url":"https://github.com/PyMVPA/PyMVPA/pull/493","diff_url":"https://github.com/PyMVPA/PyMVPA/pull/493.diff","patch_url":"https://github.com/PyMVPA/PyMVPA/pull/493.patch","issue_url":"https://api.github.com/repos/PyMVPA/PyMVPA/issues/493","number":493,"state":"open","locked":false,"title":"ENH: provide Balancer with rng= argument, provide get_rng helper","user":{"login":"yarikoptic","id":39889,"avatar_url":"https://avatars.githubusercontent.com/u/39889?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikoptic","html_url":"https://github.com/yarikoptic","followers_url":"https://api.github.com/users/yarikoptic/followers","following_url":"https://api.github.com/users/yarikoptic/following{/other_user}","gists_url":"https://api.github.com/users/yarikoptic/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikoptic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikoptic/subscriptions","organizations_url":"https://api.github.com/users/yarikoptic/orgs","repos_url":"https://api.github.com/users/yarikoptic/repos","events_url":"https://api.github.com/users/yarikoptic/events{/privacy}","received_events_url":"https://api.github.com/users/yarikoptic/received_events","type":"User","site_admin":false},"body":"Or should we name it 'random_state' to more inline with scikit.learn and actual beast it returns, @hanke -- what you think?\r\n\r\nCloses: #492","created_at":"2016-08-22T22:26:52Z","updated_at":"2016-08-23T14:16:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4986220b4c264efc16ce15d337e6f7c99eeeb44a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/PyMVPA/PyMVPA/pulls/493/commits","review_comments_url":"https://api.github.com/repos/PyMVPA/PyMVPA/pulls/493/comments","review_comment_url":"https://api.github.com/repos/PyMVPA/PyMVPA/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PyMVPA/PyMVPA/issues/493/comments","statuses_url":"https://api.github.com/repos/PyMVPA/PyMVPA/statuses/7edc534e6374fffa82b8bebe5bc2da5119c582a5","head":{"label":"yarikoptic:enh-rng","ref":"enh-rng","sha":"7edc534e6374fffa82b8bebe5bc2da5119c582a5","user":{"login":"yarikoptic","id":39889,"avatar_url":"https://avatars.githubusercontent.com/u/39889?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikoptic","html_url":"https://github.com/yarikoptic","followers_url":"https://api.github.com/users/yarikoptic/followers","following_url":"https://api.github.com/users/yarikoptic/following{/other_user}","gists_url":"https://api.github.com/users/yarikoptic/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikoptic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikoptic/subscriptions","organizations_url":"https://api.github.com/users/yarikoptic/orgs","repos_url":"https://api.github.com/users/yarikoptic/repos","events_url":"https://api.github.com/users/yarikoptic/events{/privacy}","received_events_url":"https://api.github.com/users/yarikoptic/received_events","type":"User","site_admin":false},"repo":{"id":330083,"name":"PyMVPA","full_name":"yarikoptic/PyMVPA","owner":{"login":"yarikoptic","id":39889,"avatar_url":"https://avatars.githubusercontent.com/u/39889?v=3","gravatar_id":"","url":"https://api.github.com/users/yarikoptic","html_url":"https://github.com/yarikoptic","followers_url":"https://api.github.com/users/yarikoptic/followers","following_url":"https://api.github.com/users/yarikoptic/following{/other_user}","gists_url":"https://api.github.com/users/yarikoptic/gists{/gist_id}","starred_url":"https://api.github.com/users/yarikoptic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarikoptic/subscriptions","organizations_url":"https://api.github.com/users/yarikoptic/orgs","repos_url":"https://api.github.com/users/yarikoptic/repos","events_url":"https://api.github.com/users/yarikoptic/events{/privacy}","received_events_url":"https://api.github.com/users/yarikoptic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/yarikoptic/PyMVPA","description":"Multivariate pattern analysis in Python","fork":true,"url":"https://api.github.com/repos/yarikoptic/PyMVPA","forks_url":"https://api.github.com/repos/yarikoptic/PyMVPA/forks","keys_url":"https://api.github.com/repos/yarikoptic/PyMVPA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yarikoptic/PyMVPA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yarikoptic/PyMVPA/teams","hooks_url":"https://api.github.com/repos/yarikoptic/PyMVPA/hooks","issue_events_url":"https://api.github.com/repos/yarikoptic/PyMVPA/issues/events{/number}","events_url":"https://api.github.com/repos/yarikoptic/PyMVPA/events","assignees_url":"https://api.github.com/repos/yarikoptic/PyMVPA/assignees{/user}","branches_url":"https://api.github.com/repos/yarikoptic/PyMVPA/branches{/branch}","tags_url":"https://api.github.com/repos/yarikoptic/PyMVPA/tags","blobs_url":"https://api.github.com/repos/yarikoptic/PyMVPA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yarikoptic/PyMVPA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yarikoptic/PyMVPA/git/refs{/sha}","trees_url":"https://api.github.com/repos/yarikoptic/PyMVPA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yarikoptic/PyMVPA/statuses/{sha}","languages_url":"https://api.github.com/repos/yarikoptic/PyMVPA/languages","stargazers_url":"https://api.github.com/repos/yarikoptic/PyMVPA/stargazers","contributors_url":"https://api.github.com/repos/yarikoptic/PyMVPA/contributors","subscribers_url":"https://api.github.com/repos/yarikoptic/PyMVPA/subscribers","subscription_url":"https://api.github.com/repos/yarikoptic/PyMVPA/subscription","commits_url":"https://api.github.com/repos/yarikoptic/PyMVPA/commits{/sha}","git_commits_url":"https://api.github.com/repos/yarikoptic/PyMVPA/git/commits{/sha}","comments_url":"https://api.github.com/repos/yarikoptic/PyMVPA/comments{/number}","issue_comment_url":"https://api.github.com/repos/yarikoptic/PyMVPA/issues/comments{/number}","contents_url":"https://api.github.com/repos/yarikoptic/PyMVPA/contents/{+path}","compare_url":"https://api.github.com/repos/yarikoptic/PyMVPA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yarikoptic/PyMVPA/merges","archive_url":"https://api.github.com/repos/yarikoptic/PyMVPA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yarikoptic/PyMVPA/downloads","issues_url":"https://api.github.com/repos/yarikoptic/PyMVPA/issues{/number}","pulls_url":"https://api.github.com/repos/yarikoptic/PyMVPA/pulls{/number}","milestones_url":"https://api.github.com/repos/yarikoptic/PyMVPA/milestones{/number}","notifications_url":"https://api.github.com/repos/yarikoptic/PyMVPA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yarikoptic/PyMVPA/labels{/name}","releases_url":"https://api.github.com/repos/yarikoptic/PyMVPA/releases{/id}","deployments_url":"https://api.github.com/repos/yarikoptic/PyMVPA/deployments","created_at":"2009-10-07T19:01:26Z","updated_at":"2015-05-06T22:55:11Z","pushed_at":"2016-08-23T02:04:34Z","git_url":"git://github.com/yarikoptic/PyMVPA.git","ssh_url":"git@github.com:yarikoptic/PyMVPA.git","clone_url":"https://github.com/yarikoptic/PyMVPA.git","svn_url":"https://github.com/yarikoptic/PyMVPA","homepage":"http://www.pymvpa.org","size":26802,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":3,"default_branch":"master"}},"base":{"label":"PyMVPA:master","ref":"master","sha":"5897911178de5fd83a99c67df7242551d14e7120","user":{"login":"PyMVPA","id":341117,"avatar_url":"https://avatars.githubusercontent.com/u/341117?v=3","gravatar_id":"","url":"https://api.github.com/users/PyMVPA","html_url":"https://github.com/PyMVPA","followers_url":"https://api.github.com/users/PyMVPA/followers","following_url":"https://api.github.com/users/PyMVPA/following{/other_user}","gists_url":"https://api.github.com/users/PyMVPA/gists{/gist_id}","starred_url":"https://api.github.com/users/PyMVPA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyMVPA/subscriptions","organizations_url":"https://api.github.com/users/PyMVPA/orgs","repos_url":"https://api.github.com/users/PyMVPA/repos","events_url":"https://api.github.com/users/PyMVPA/events{/privacy}","received_events_url":"https://api.github.com/users/PyMVPA/received_events","type":"Organization","site_admin":false},"repo":{"id":330077,"name":"PyMVPA","full_name":"PyMVPA/PyMVPA","owner":{"login":"PyMVPA","id":341117,"avatar_url":"https://avatars.githubusercontent.com/u/341117?v=3","gravatar_id":"","url":"https://api.github.com/users/PyMVPA","html_url":"https://github.com/PyMVPA","followers_url":"https://api.github.com/users/PyMVPA/followers","following_url":"https://api.github.com/users/PyMVPA/following{/other_user}","gists_url":"https://api.github.com/users/PyMVPA/gists{/gist_id}","starred_url":"https://api.github.com/users/PyMVPA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PyMVPA/subscriptions","organizations_url":"https://api.github.com/users/PyMVPA/orgs","repos_url":"https://api.github.com/users/PyMVPA/repos","events_url":"https://api.github.com/users/PyMVPA/events{/privacy}","received_events_url":"https://api.github.com/users/PyMVPA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PyMVPA/PyMVPA","description":"MultiVariate Pattern Analysis in Python","fork":false,"url":"https://api.github.com/repos/PyMVPA/PyMVPA","forks_url":"https://api.github.com/repos/PyMVPA/PyMVPA/forks","keys_url":"https://api.github.com/repos/PyMVPA/PyMVPA/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PyMVPA/PyMVPA/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PyMVPA/PyMVPA/teams","hooks_url":"https://api.github.com/repos/PyMVPA/PyMVPA/hooks","issue_events_url":"https://api.github.com/repos/PyMVPA/PyMVPA/issues/events{/number}","events_url":"https://api.github.com/repos/PyMVPA/PyMVPA/events","assignees_url":"https://api.github.com/repos/PyMVPA/PyMVPA/assignees{/user}","branches_url":"https://api.github.com/repos/PyMVPA/PyMVPA/branches{/branch}","tags_url":"https://api.github.com/repos/PyMVPA/PyMVPA/tags","blobs_url":"https://api.github.com/repos/PyMVPA/PyMVPA/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PyMVPA/PyMVPA/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PyMVPA/PyMVPA/git/refs{/sha}","trees_url":"https://api.github.com/repos/PyMVPA/PyMVPA/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PyMVPA/PyMVPA/statuses/{sha}","languages_url":"https://api.github.com/repos/PyMVPA/PyMVPA/languages","stargazers_url":"https://api.github.com/repos/PyMVPA/PyMVPA/stargazers","contributors_url":"https://api.github.com/repos/PyMVPA/PyMVPA/contributors","subscribers_url":"https://api.github.com/repos/PyMVPA/PyMVPA/subscribers","subscription_url":"https://api.github.com/repos/PyMVPA/PyMVPA/subscription","commits_url":"https://api.github.com/repos/PyMVPA/PyMVPA/commits{/sha}","git_commits_url":"https://api.github.com/repos/PyMVPA/PyMVPA/git/commits{/sha}","comments_url":"https://api.github.com/repos/PyMVPA/PyMVPA/comments{/number}","issue_comment_url":"https://api.github.com/repos/PyMVPA/PyMVPA/issues/comments{/number}","contents_url":"https://api.github.com/repos/PyMVPA/PyMVPA/contents/{+path}","compare_url":"https://api.github.com/repos/PyMVPA/PyMVPA/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PyMVPA/PyMVPA/merges","archive_url":"https://api.github.com/repos/PyMVPA/PyMVPA/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PyMVPA/PyMVPA/downloads","issues_url":"https://api.github.com/repos/PyMVPA/PyMVPA/issues{/number}","pulls_url":"https://api.github.com/repos/PyMVPA/PyMVPA/pulls{/number}","milestones_url":"https://api.github.com/repos/PyMVPA/PyMVPA/milestones{/number}","notifications_url":"https://api.github.com/repos/PyMVPA/PyMVPA/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PyMVPA/PyMVPA/labels{/name}","releases_url":"https://api.github.com/repos/PyMVPA/PyMVPA/releases{/id}","deployments_url":"https://api.github.com/repos/PyMVPA/PyMVPA/deployments","created_at":"2009-10-07T18:57:13Z","updated_at":"2016-08-23T05:04:46Z","pushed_at":"2016-08-23T12:39:25Z","git_url":"git://github.com/PyMVPA/PyMVPA.git","ssh_url":"git@github.com:PyMVPA/PyMVPA.git","clone_url":"https://github.com/PyMVPA/PyMVPA.git","svn_url":"https://github.com/PyMVPA/PyMVPA","homepage":"http://www.pymvpa.org","size":39883,"stargazers_count":135,"watchers_count":135,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":70,"mirror_url":null,"open_issues_count":94,"forks":70,"open_issues":94,"watchers":135,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PyMVPA/PyMVPA/pulls/493"},"html":{"href":"https://github.com/PyMVPA/PyMVPA/pull/493"},"issue":{"href":"https://api.github.com/repos/PyMVPA/PyMVPA/issues/493"},"comments":{"href":"https://api.github.com/repos/PyMVPA/PyMVPA/issues/493/comments"},"review_comments":{"href":"https://api.github.com/repos/PyMVPA/PyMVPA/pulls/493/comments"},"review_comment":{"href":"https://api.github.com/repos/PyMVPA/PyMVPA/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PyMVPA/PyMVPA/pulls/493/commits"},"statuses":{"href":"https://api.github.com/repos/PyMVPA/PyMVPA/statuses/7edc534e6374fffa82b8bebe5bc2da5119c582a5"}}}}
{"actor":{"display_login":"yarikoptic"}}