{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/91958413","pull_request_review_id":12466304,"id":91958413,"diff_hunk":"@@ -339,8 +352,14 @@ def check_array(array, accept_sparse=None, dtype=\"numeric\", order=None,\n     X_converted : object\n         The converted and validated X.\n     \"\"\"\n-    if isinstance(accept_sparse, str):\n-        accept_sparse = [accept_sparse]\n+    # accept_sparse 'None' deprecation check\n+    if accept_sparse is None:\n+        warnings.warn(\n+                \"Passing 'None' to parameter 'accept_sparse' is \"","path":"sklearn/utils/validation.py","position":92,"original_position":92,"commit_id":"f886ce2d435d9961da8af14cc49b736200bb7929","original_commit_id":"f886ce2d435d9961da8af14cc49b736200bb7929","user":{"login":"lesteve","id":1680079,"avatar_url":"https://avatars.githubusercontent.com/u/1680079?v=3","gravatar_id":"","url":"https://api.github.com/users/lesteve","html_url":"https://github.com/lesteve","followers_url":"https://api.github.com/users/lesteve/followers","following_url":"https://api.github.com/users/lesteve/following{/other_user}","gists_url":"https://api.github.com/users/lesteve/gists{/gist_id}","starred_url":"https://api.github.com/users/lesteve/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lesteve/subscriptions","organizations_url":"https://api.github.com/users/lesteve/orgs","repos_url":"https://api.github.com/users/lesteve/repos","events_url":"https://api.github.com/users/lesteve/events{/privacy}","received_events_url":"https://api.github.com/users/lesteve/received_events","type":"User","site_admin":false},"body":"Add the function name to the warning. The origin of the warning is sometimes not trivial to understand so you want to make it as explicit as possible.","created_at":"2016-12-12T14:40:08Z","updated_at":"2016-12-12T14:51:48Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/7937#discussion_r91958413","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7937","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/91958413"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/7937#discussion_r91958413"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7937"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7937","id":95229692,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/7937","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/7937.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/7937.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7937","number":7937,"state":"open","locked":false,"title":"[MRG+1] Fix check array sparse param","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 #7880\r\n\r\n\r\n#### What does this implement/fix? Explain your changes.\r\n- Validates that the accept_sparse parameter for check_array is a string, list of strings, boolean, or None\r\n- Updates the documentation to state that booleans are allowed\r\n- Added test cases to test_validation.py\r\n\r\n#### Any other comments?\r\n\r\n1. I made the decision to currently allow booleans because there were lots of places that used `accept_sparse=True` which this would break otherwise.\r\n2. Currently, the validation is checked in `_ensure_sparse_format` because this is where the parameter is used. However, this means no warning or exception is thrown if the array is not sparse. This may or may not be the right behavior.","created_at":"2016-11-24T21:42:26Z","updated_at":"2016-12-12T14:51:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b66c179acf7fc5314932ec7b95e30bf60abf05bd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7937/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7937/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/7937/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/f886ce2d435d9961da8af14cc49b736200bb7929","head":{"label":"jkarno:fix_check_array_sparse_param","ref":"fix_check_array_sparse_param","sha":"f886ce2d435d9961da8af14cc49b736200bb7929","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-12-12T06:47:24Z","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":77147,"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":"0847c92678b1a65a707189de7f0f6f9ab5339e7e","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-12-12T14:24:20Z","pushed_at":"2016-12-12T14:11:25Z","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":130843,"stargazers_count":15271,"watchers_count":15271,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":8585,"mirror_url":null,"open_issues_count":1160,"forks":8585,"open_issues":1160,"watchers":15271,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7937"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/7937"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7937"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/7937/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/7937/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/7937/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/f886ce2d435d9961da8af14cc49b736200bb7929"}}}}
{"actor":{"display_login":"lesteve"}}