{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/75579469","id":75579469,"diff_hunk":"@@ -643,8 +644,10 @@ def __init__(self, n_components=2, perplexity=30.0,\n                  n_iter_without_progress=30, min_grad_norm=1e-7,\n                  metric=\"euclidean\", init=\"random\", verbose=0,\n                  random_state=None, method='barnes_hut', angle=0.5):\n-        if init not in [\"pca\", \"random\"] or isinstance(init, np.ndarray):\n-            msg = \"'init' must be 'pca', 'random' or a NumPy array\"\n+        if not ((not isinstance(init, np.ndarray) and","path":"sklearn/manifold/t_sne.py","position":18,"original_position":18,"commit_id":"41b6b8d66b1241b50f40bc557631eecbc546f43b","original_commit_id":"41b6b8d66b1241b50f40bc557631eecbc546f43b","user":{"login":"agramfort","id":161052,"avatar_url":"https://avatars.githubusercontent.com/u/161052?v=3","gravatar_id":"","url":"https://api.github.com/users/agramfort","html_url":"https://github.com/agramfort","followers_url":"https://api.github.com/users/agramfort/followers","following_url":"https://api.github.com/users/agramfort/following{/other_user}","gists_url":"https://api.github.com/users/agramfort/gists{/gist_id}","starred_url":"https://api.github.com/users/agramfort/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agramfort/subscriptions","organizations_url":"https://api.github.com/users/agramfort/orgs","repos_url":"https://api.github.com/users/agramfort/repos","events_url":"https://api.github.com/users/agramfort/events{/privacy}","received_events_url":"https://api.github.com/users/agramfort/received_events","type":"User","site_admin":false},"body":"same remark here","created_at":"2016-08-20T14:25:36Z","updated_at":"2016-08-20T14:25:36Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/7208#discussion_r75579469","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7208","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/75579469"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/7208#discussion_r75579469"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7208"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7208","id":81862847,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/7208","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/7208.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/7208.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7208","number":7208,"state":"open","locked":false,"title":"[MRG] Fix TSNE init as NumPy array","user":{"login":"b-carter","id":6495170,"avatar_url":"https://avatars.githubusercontent.com/u/6495170?v=3","gravatar_id":"","url":"https://api.github.com/users/b-carter","html_url":"https://github.com/b-carter","followers_url":"https://api.github.com/users/b-carter/followers","following_url":"https://api.github.com/users/b-carter/following{/other_user}","gists_url":"https://api.github.com/users/b-carter/gists{/gist_id}","starred_url":"https://api.github.com/users/b-carter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b-carter/subscriptions","organizations_url":"https://api.github.com/users/b-carter/orgs","repos_url":"https://api.github.com/users/b-carter/repos","events_url":"https://api.github.com/users/b-carter/events{/privacy}","received_events_url":"https://api.github.com/users/b-carter/received_events","type":"User","site_admin":false},"body":"<!--\r\nThanks for contributing a pull request! Please ensure you have taken a look at\r\nthe contribution guidelines: https://github.com/scikit-learn/scikit-learn/blob/master/CONTRIBUTING.md#Contributing-Pull-Requests\r\n-->\r\n#### Reference Issue\r\nFixes #7204 \r\n\r\n\r\n#### What does this implement/fix? Explain your changes.\r\nFixes discrepancy between doc and type checking for the 'init' parameter in TSNE. NumPy array is now a possible value for 'init'. Type check and docstring are updated to reflect this change.\r\n\r\nUpdates existing test to reflect change in error msg.\r\n\r\nAdds new test to validate NumPy array as a possible 'init' value.\r\n\r\n#### Any other comments?\r\nMade one other small readability change by reordering elif options to show string options before NumPy array check.\r\n\r\n<!--\r\nPlease be aware that we are a loose team of volunteers so patience is\r\nnecessary; assistance handling other issues is very welcome. We value\r\nall user contributions, no matter how minor they are. If we are slow to\r\nreview, either the pull request needs some benchmarking, tinkering,\r\nconvincing, etc. or more likely the reviewers are simply busy. In either\r\ncase, we ask for your understanding during the review process.\r\nFor more information, see our FAQ on this topic:\r\nhttp://scikit-learn.org/dev/faq.html#why-is-my-pull-request-not-getting-any-attention.\r\n\r\nThanks for contributing!\r\n-->","created_at":"2016-08-18T18:17:29Z","updated_at":"2016-08-20T14:25:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"540b558feb0e13d99e55847874036e353e35e141","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7208/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7208/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/7208/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/41b6b8d66b1241b50f40bc557631eecbc546f43b","head":{"label":"b-carter:fix_tsne_numpy_array_init","ref":"fix_tsne_numpy_array_init","sha":"41b6b8d66b1241b50f40bc557631eecbc546f43b","user":{"login":"b-carter","id":6495170,"avatar_url":"https://avatars.githubusercontent.com/u/6495170?v=3","gravatar_id":"","url":"https://api.github.com/users/b-carter","html_url":"https://github.com/b-carter","followers_url":"https://api.github.com/users/b-carter/followers","following_url":"https://api.github.com/users/b-carter/following{/other_user}","gists_url":"https://api.github.com/users/b-carter/gists{/gist_id}","starred_url":"https://api.github.com/users/b-carter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b-carter/subscriptions","organizations_url":"https://api.github.com/users/b-carter/orgs","repos_url":"https://api.github.com/users/b-carter/repos","events_url":"https://api.github.com/users/b-carter/events{/privacy}","received_events_url":"https://api.github.com/users/b-carter/received_events","type":"User","site_admin":false},"repo":{"id":61582473,"name":"scikit-learn","full_name":"b-carter/scikit-learn","owner":{"login":"b-carter","id":6495170,"avatar_url":"https://avatars.githubusercontent.com/u/6495170?v=3","gravatar_id":"","url":"https://api.github.com/users/b-carter","html_url":"https://github.com/b-carter","followers_url":"https://api.github.com/users/b-carter/followers","following_url":"https://api.github.com/users/b-carter/following{/other_user}","gists_url":"https://api.github.com/users/b-carter/gists{/gist_id}","starred_url":"https://api.github.com/users/b-carter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/b-carter/subscriptions","organizations_url":"https://api.github.com/users/b-carter/orgs","repos_url":"https://api.github.com/users/b-carter/repos","events_url":"https://api.github.com/users/b-carter/events{/privacy}","received_events_url":"https://api.github.com/users/b-carter/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/b-carter/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/b-carter/scikit-learn","forks_url":"https://api.github.com/repos/b-carter/scikit-learn/forks","keys_url":"https://api.github.com/repos/b-carter/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/b-carter/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/b-carter/scikit-learn/teams","hooks_url":"https://api.github.com/repos/b-carter/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/b-carter/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/b-carter/scikit-learn/events","assignees_url":"https://api.github.com/repos/b-carter/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/b-carter/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/b-carter/scikit-learn/tags","blobs_url":"https://api.github.com/repos/b-carter/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/b-carter/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/b-carter/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/b-carter/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/b-carter/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/b-carter/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/b-carter/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/b-carter/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/b-carter/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/b-carter/scikit-learn/subscription","commits_url":"https://api.github.com/repos/b-carter/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/b-carter/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/b-carter/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/b-carter/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/b-carter/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/b-carter/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/b-carter/scikit-learn/merges","archive_url":"https://api.github.com/repos/b-carter/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/b-carter/scikit-learn/downloads","issues_url":"https://api.github.com/repos/b-carter/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/b-carter/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/b-carter/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/b-carter/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/b-carter/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/b-carter/scikit-learn/releases{/id}","deployments_url":"https://api.github.com/repos/b-carter/scikit-learn/deployments","created_at":"2016-06-20T21:45:01Z","updated_at":"2016-06-20T21:45:09Z","pushed_at":"2016-08-19T01:24:40Z","git_url":"git://github.com/b-carter/scikit-learn.git","ssh_url":"git@github.com:b-carter/scikit-learn.git","clone_url":"https://github.com/b-carter/scikit-learn.git","svn_url":"https://github.com/b-carter/scikit-learn","homepage":"http://scikit-learn.org","size":73593,"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":"19d6d925edd33288acee343c5eb6afdc80b84dbc","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-08-20T13:20:32Z","pushed_at":"2016-08-20T13:20:12Z","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":122779,"stargazers_count":12911,"watchers_count":12911,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7467,"mirror_url":null,"open_issues_count":1257,"forks":7467,"open_issues":1257,"watchers":12911,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7208"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/7208"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7208"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7208/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7208/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/7208/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/41b6b8d66b1241b50f40bc557631eecbc546f43b"}}}}
{"actor":{"display_login":"agramfort"}}