{"action":"created","comment":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/27797181","id":27797181,"diff_hunk":"@@ -622,11 +622,11 @@ def if_matplotlib(func):\n     @wraps(func)\n     def run_test(*args, **kwargs):\n         try:\n-            import matplotlib\n+            import matplotlib,pyplot as plt","path":"sklearn/utils/testing.py","position":5,"original_position":5,"commit_id":"1d015d53d8c3f6aa0ff13417531ecd156d205555","original_commit_id":"1d015d53d8c3f6aa0ff13417531ecd156d205555","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":"It should be first ``import matplotlib``, then set the backend, then ``import matplotlib.pyplot``","created_at":"2015-04-06T13:43:20Z","updated_at":"2015-04-06T13:43:20Z","html_url":"https://github.com/scikit-learn/scikit-learn/pull/4527#discussion_r27797181","pull_request_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4527","_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/comments/27797181"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/4527#discussion_r27797181"},"pull_request":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4527"}}},"pull_request":{"url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4527","id":32668233,"html_url":"https://github.com/scikit-learn/scikit-learn/pull/4527","diff_url":"https://github.com/scikit-learn/scikit-learn/pull/4527.diff","patch_url":"https://github.com/scikit-learn/scikit-learn/pull/4527.patch","issue_url":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4527","number":4527,"state":"open","locked":false,"title":"Fix for issue #4524","user":{"login":"jcm1317","id":4109617,"avatar_url":"https://avatars.githubusercontent.com/u/4109617?v=3","gravatar_id":"","url":"https://api.github.com/users/jcm1317","html_url":"https://github.com/jcm1317","followers_url":"https://api.github.com/users/jcm1317/followers","following_url":"https://api.github.com/users/jcm1317/following{/other_user}","gists_url":"https://api.github.com/users/jcm1317/gists{/gist_id}","starred_url":"https://api.github.com/users/jcm1317/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcm1317/subscriptions","organizations_url":"https://api.github.com/users/jcm1317/orgs","repos_url":"https://api.github.com/users/jcm1317/repos","events_url":"https://api.github.com/users/jcm1317/events{/privacy}","received_events_url":"https://api.github.com/users/jcm1317/received_events","type":"User","site_admin":false},"body":"    - Changed import to import matplotlib.pyplt as plt\r\n    - Narrowed exception to catch the ImportError","created_at":"2015-04-06T08:49:56Z","updated_at":"2015-04-06T13:43:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f8ca77ce3e07f3fc9ca84722cd355922b8bc8422","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4527/commits","review_comments_url":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4527/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/4527/comments","statuses_url":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/1d015d53d8c3f6aa0ff13417531ecd156d205555","head":{"label":"jcm1317:issue_4524","ref":"issue_4524","sha":"1d015d53d8c3f6aa0ff13417531ecd156d205555","user":{"login":"jcm1317","id":4109617,"avatar_url":"https://avatars.githubusercontent.com/u/4109617?v=3","gravatar_id":"","url":"https://api.github.com/users/jcm1317","html_url":"https://github.com/jcm1317","followers_url":"https://api.github.com/users/jcm1317/followers","following_url":"https://api.github.com/users/jcm1317/following{/other_user}","gists_url":"https://api.github.com/users/jcm1317/gists{/gist_id}","starred_url":"https://api.github.com/users/jcm1317/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcm1317/subscriptions","organizations_url":"https://api.github.com/users/jcm1317/orgs","repos_url":"https://api.github.com/users/jcm1317/repos","events_url":"https://api.github.com/users/jcm1317/events{/privacy}","received_events_url":"https://api.github.com/users/jcm1317/received_events","type":"User","site_admin":false},"repo":{"id":33473345,"name":"scikit-learn","full_name":"jcm1317/scikit-learn","owner":{"login":"jcm1317","id":4109617,"avatar_url":"https://avatars.githubusercontent.com/u/4109617?v=3","gravatar_id":"","url":"https://api.github.com/users/jcm1317","html_url":"https://github.com/jcm1317","followers_url":"https://api.github.com/users/jcm1317/followers","following_url":"https://api.github.com/users/jcm1317/following{/other_user}","gists_url":"https://api.github.com/users/jcm1317/gists{/gist_id}","starred_url":"https://api.github.com/users/jcm1317/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcm1317/subscriptions","organizations_url":"https://api.github.com/users/jcm1317/orgs","repos_url":"https://api.github.com/users/jcm1317/repos","events_url":"https://api.github.com/users/jcm1317/events{/privacy}","received_events_url":"https://api.github.com/users/jcm1317/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jcm1317/scikit-learn","description":"scikit-learn: machine learning in Python","fork":true,"url":"https://api.github.com/repos/jcm1317/scikit-learn","forks_url":"https://api.github.com/repos/jcm1317/scikit-learn/forks","keys_url":"https://api.github.com/repos/jcm1317/scikit-learn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jcm1317/scikit-learn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jcm1317/scikit-learn/teams","hooks_url":"https://api.github.com/repos/jcm1317/scikit-learn/hooks","issue_events_url":"https://api.github.com/repos/jcm1317/scikit-learn/issues/events{/number}","events_url":"https://api.github.com/repos/jcm1317/scikit-learn/events","assignees_url":"https://api.github.com/repos/jcm1317/scikit-learn/assignees{/user}","branches_url":"https://api.github.com/repos/jcm1317/scikit-learn/branches{/branch}","tags_url":"https://api.github.com/repos/jcm1317/scikit-learn/tags","blobs_url":"https://api.github.com/repos/jcm1317/scikit-learn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jcm1317/scikit-learn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jcm1317/scikit-learn/git/refs{/sha}","trees_url":"https://api.github.com/repos/jcm1317/scikit-learn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jcm1317/scikit-learn/statuses/{sha}","languages_url":"https://api.github.com/repos/jcm1317/scikit-learn/languages","stargazers_url":"https://api.github.com/repos/jcm1317/scikit-learn/stargazers","contributors_url":"https://api.github.com/repos/jcm1317/scikit-learn/contributors","subscribers_url":"https://api.github.com/repos/jcm1317/scikit-learn/subscribers","subscription_url":"https://api.github.com/repos/jcm1317/scikit-learn/subscription","commits_url":"https://api.github.com/repos/jcm1317/scikit-learn/commits{/sha}","git_commits_url":"https://api.github.com/repos/jcm1317/scikit-learn/git/commits{/sha}","comments_url":"https://api.github.com/repos/jcm1317/scikit-learn/comments{/number}","issue_comment_url":"https://api.github.com/repos/jcm1317/scikit-learn/issues/comments{/number}","contents_url":"https://api.github.com/repos/jcm1317/scikit-learn/contents/{+path}","compare_url":"https://api.github.com/repos/jcm1317/scikit-learn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jcm1317/scikit-learn/merges","archive_url":"https://api.github.com/repos/jcm1317/scikit-learn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jcm1317/scikit-learn/downloads","issues_url":"https://api.github.com/repos/jcm1317/scikit-learn/issues{/number}","pulls_url":"https://api.github.com/repos/jcm1317/scikit-learn/pulls{/number}","milestones_url":"https://api.github.com/repos/jcm1317/scikit-learn/milestones{/number}","notifications_url":"https://api.github.com/repos/jcm1317/scikit-learn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jcm1317/scikit-learn/labels{/name}","releases_url":"https://api.github.com/repos/jcm1317/scikit-learn/releases{/id}","created_at":"2015-04-06T08:31:12Z","updated_at":"2015-04-06T08:31:22Z","pushed_at":"2015-04-06T08:47:59Z","git_url":"git://github.com/jcm1317/scikit-learn.git","ssh_url":"git@github.com:jcm1317/scikit-learn.git","clone_url":"https://github.com/jcm1317/scikit-learn.git","svn_url":"https://github.com/jcm1317/scikit-learn","homepage":"http://scikit-learn.org","size":120313,"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":"9206a785c9d9bdbeb7a6d155b4d7d80886e636a6","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}","created_at":"2010-08-17T09:43:38Z","updated_at":"2015-04-06T13:38:02Z","pushed_at":"2015-04-06T13:18:13Z","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":120313,"stargazers_count":5490,"watchers_count":5490,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3275,"mirror_url":null,"open_issues_count":610,"forks":3275,"open_issues":610,"watchers":5490,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4527"},"html":{"href":"https://github.com/scikit-learn/scikit-learn/pull/4527"},"issue":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4527"},"comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/issues/4527/comments"},"review_comments":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/pulls/4527/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/4527/commits"},"statuses":{"href":"https://api.github.com/repos/scikit-learn/scikit-learn/statuses/1d015d53d8c3f6aa0ff13417531ecd156d205555"}}}}