{"action":"created","comment":{"url":"https://api.github.com/repos/scipy/scipy/pulls/comments/69022034","id":69022034,"diff_hunk":"@@ -424,6 +441,55 @@ def plot(w, h):\n         freqz([1.0], worN=8, plot=plot)\n \n \n+class TestSosFreqz(TestCase):\n+\n+    def test_sosfreqz_basic(self):\n+        # Compare the results of freqz and sosfreqz for a low order\n+        # Butterworth filter.\n+\n+        N = 500\n+\n+        b, a = butter(4, 0.2)\n+        sos = butter(4, 0.2, output='sos')\n+        w, h = freqz(b, a, worN=N)\n+        w2, h2 = sosfreqz(sos, worN=N)\n+        assert_equal(w2, w)\n+        assert_allclose(h2, h, rtol=1e-10, atol=1e-14)\n+\n+        b, a = ellip(3, 1, 30, (0.2, 0.3), btype='bandpass')\n+        sos = ellip(3, 1, 30, (0.2, 0.3), btype='bandpass', output='sos')\n+        w, h = freqz(b, a, worN=N)\n+        w2, h2 = sosfreqz(sos, worN=N)\n+        assert_equal(w2, w)\n+        assert_allclose(h2, h, rtol=1e-10, atol=1e-14)\n+        # must have at least one section\n+        assert_raises(ValueError, sosfreqz, sos[:0])\n+\n+    @mpmath_check(\"0.10\")\n+    def test_sos_freqz_against_mp(self):\n+        # Compare the result of sosfreqz applied to a high order Butterworth\n+        # filter against the result computed using mpmath.  (signal.freqz fails\n+        # miserably with such high order filters.)\n+        import mpsig\n+        N = 500\n+        order = 25\n+        Wn = 0.15\n+        old_dps = mpmath.mp.dps\n+        mpmath.mp.dps = 80\n+        try:","path":"scipy/signal/tests/test_filter_design.py","position":81,"original_position":81,"commit_id":"caec9ef5158271dd5dca4ac085ca9b8e26746c48","original_commit_id":"caec9ef5158271dd5dca4ac085ca9b8e26746c48","user":{"login":"Eric89GXL","id":2365790,"avatar_url":"https://avatars.githubusercontent.com/u/2365790?v=3","gravatar_id":"","url":"https://api.github.com/users/Eric89GXL","html_url":"https://github.com/Eric89GXL","followers_url":"https://api.github.com/users/Eric89GXL/followers","following_url":"https://api.github.com/users/Eric89GXL/following{/other_user}","gists_url":"https://api.github.com/users/Eric89GXL/gists{/gist_id}","starred_url":"https://api.github.com/users/Eric89GXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eric89GXL/subscriptions","organizations_url":"https://api.github.com/users/Eric89GXL/orgs","repos_url":"https://api.github.com/users/Eric89GXL/repos","events_url":"https://api.github.com/users/Eric89GXL/events{/privacy}","received_events_url":"https://api.github.com/users/Eric89GXL/received_events","type":"User","site_admin":false},"body":"Cool, I'll put that in","created_at":"2016-06-29T20:34:39Z","updated_at":"2016-06-29T20:34:39Z","html_url":"https://github.com/scipy/scipy/pull/6328#discussion_r69022034","pull_request_url":"https://api.github.com/repos/scipy/scipy/pulls/6328","_links":{"self":{"href":"https://api.github.com/repos/scipy/scipy/pulls/comments/69022034"},"html":{"href":"https://github.com/scipy/scipy/pull/6328#discussion_r69022034"},"pull_request":{"href":"https://api.github.com/repos/scipy/scipy/pulls/6328"}}},"pull_request":{"url":"https://api.github.com/repos/scipy/scipy/pulls/6328","id":75545354,"html_url":"https://github.com/scipy/scipy/pull/6328","diff_url":"https://github.com/scipy/scipy/pull/6328.diff","patch_url":"https://github.com/scipy/scipy/pull/6328.patch","issue_url":"https://api.github.com/repos/scipy/scipy/issues/6328","number":6328,"state":"open","locked":false,"title":"ENH: sosfreqz","user":{"login":"Eric89GXL","id":2365790,"avatar_url":"https://avatars.githubusercontent.com/u/2365790?v=3","gravatar_id":"","url":"https://api.github.com/users/Eric89GXL","html_url":"https://github.com/Eric89GXL","followers_url":"https://api.github.com/users/Eric89GXL/followers","following_url":"https://api.github.com/users/Eric89GXL/following{/other_user}","gists_url":"https://api.github.com/users/Eric89GXL/gists{/gist_id}","starred_url":"https://api.github.com/users/Eric89GXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eric89GXL/subscriptions","organizations_url":"https://api.github.com/users/Eric89GXL/orgs","repos_url":"https://api.github.com/users/Eric89GXL/repos","events_url":"https://api.github.com/users/Eric89GXL/events{/privacy}","received_events_url":"https://api.github.com/users/Eric89GXL/received_events","type":"User","site_admin":false},"body":"I had no idea how close to mergeable @WarrenWeckesser's #4465 was. This should be ready for review/merge, I just rebased and tweaked the release notes.","created_at":"2016-06-28T20:33:10Z","updated_at":"2016-06-29T20:34:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c806813d055f2193af42a4c638b29cce9fab62ed","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/scipy/scipy/pulls/6328/commits","review_comments_url":"https://api.github.com/repos/scipy/scipy/pulls/6328/comments","review_comment_url":"https://api.github.com/repos/scipy/scipy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/6328/comments","statuses_url":"https://api.github.com/repos/scipy/scipy/statuses/caec9ef5158271dd5dca4ac085ca9b8e26746c48","head":{"label":"Eric89GXL:sosfreqz","ref":"sosfreqz","sha":"caec9ef5158271dd5dca4ac085ca9b8e26746c48","user":{"login":"Eric89GXL","id":2365790,"avatar_url":"https://avatars.githubusercontent.com/u/2365790?v=3","gravatar_id":"","url":"https://api.github.com/users/Eric89GXL","html_url":"https://github.com/Eric89GXL","followers_url":"https://api.github.com/users/Eric89GXL/followers","following_url":"https://api.github.com/users/Eric89GXL/following{/other_user}","gists_url":"https://api.github.com/users/Eric89GXL/gists{/gist_id}","starred_url":"https://api.github.com/users/Eric89GXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eric89GXL/subscriptions","organizations_url":"https://api.github.com/users/Eric89GXL/orgs","repos_url":"https://api.github.com/users/Eric89GXL/repos","events_url":"https://api.github.com/users/Eric89GXL/events{/privacy}","received_events_url":"https://api.github.com/users/Eric89GXL/received_events","type":"User","site_admin":false},"repo":{"id":13531922,"name":"scipy","full_name":"Eric89GXL/scipy","owner":{"login":"Eric89GXL","id":2365790,"avatar_url":"https://avatars.githubusercontent.com/u/2365790?v=3","gravatar_id":"","url":"https://api.github.com/users/Eric89GXL","html_url":"https://github.com/Eric89GXL","followers_url":"https://api.github.com/users/Eric89GXL/followers","following_url":"https://api.github.com/users/Eric89GXL/following{/other_user}","gists_url":"https://api.github.com/users/Eric89GXL/gists{/gist_id}","starred_url":"https://api.github.com/users/Eric89GXL/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eric89GXL/subscriptions","organizations_url":"https://api.github.com/users/Eric89GXL/orgs","repos_url":"https://api.github.com/users/Eric89GXL/repos","events_url":"https://api.github.com/users/Eric89GXL/events{/privacy}","received_events_url":"https://api.github.com/users/Eric89GXL/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Eric89GXL/scipy","description":"Scipy main repository","fork":true,"url":"https://api.github.com/repos/Eric89GXL/scipy","forks_url":"https://api.github.com/repos/Eric89GXL/scipy/forks","keys_url":"https://api.github.com/repos/Eric89GXL/scipy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Eric89GXL/scipy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Eric89GXL/scipy/teams","hooks_url":"https://api.github.com/repos/Eric89GXL/scipy/hooks","issue_events_url":"https://api.github.com/repos/Eric89GXL/scipy/issues/events{/number}","events_url":"https://api.github.com/repos/Eric89GXL/scipy/events","assignees_url":"https://api.github.com/repos/Eric89GXL/scipy/assignees{/user}","branches_url":"https://api.github.com/repos/Eric89GXL/scipy/branches{/branch}","tags_url":"https://api.github.com/repos/Eric89GXL/scipy/tags","blobs_url":"https://api.github.com/repos/Eric89GXL/scipy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Eric89GXL/scipy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Eric89GXL/scipy/git/refs{/sha}","trees_url":"https://api.github.com/repos/Eric89GXL/scipy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Eric89GXL/scipy/statuses/{sha}","languages_url":"https://api.github.com/repos/Eric89GXL/scipy/languages","stargazers_url":"https://api.github.com/repos/Eric89GXL/scipy/stargazers","contributors_url":"https://api.github.com/repos/Eric89GXL/scipy/contributors","subscribers_url":"https://api.github.com/repos/Eric89GXL/scipy/subscribers","subscription_url":"https://api.github.com/repos/Eric89GXL/scipy/subscription","commits_url":"https://api.github.com/repos/Eric89GXL/scipy/commits{/sha}","git_commits_url":"https://api.github.com/repos/Eric89GXL/scipy/git/commits{/sha}","comments_url":"https://api.github.com/repos/Eric89GXL/scipy/comments{/number}","issue_comment_url":"https://api.github.com/repos/Eric89GXL/scipy/issues/comments{/number}","contents_url":"https://api.github.com/repos/Eric89GXL/scipy/contents/{+path}","compare_url":"https://api.github.com/repos/Eric89GXL/scipy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Eric89GXL/scipy/merges","archive_url":"https://api.github.com/repos/Eric89GXL/scipy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Eric89GXL/scipy/downloads","issues_url":"https://api.github.com/repos/Eric89GXL/scipy/issues{/number}","pulls_url":"https://api.github.com/repos/Eric89GXL/scipy/pulls{/number}","milestones_url":"https://api.github.com/repos/Eric89GXL/scipy/milestones{/number}","notifications_url":"https://api.github.com/repos/Eric89GXL/scipy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Eric89GXL/scipy/labels{/name}","releases_url":"https://api.github.com/repos/Eric89GXL/scipy/releases{/id}","deployments_url":"https://api.github.com/repos/Eric89GXL/scipy/deployments","created_at":"2013-10-13T01:20:02Z","updated_at":"2015-04-21T19:06:59Z","pushed_at":"2016-06-29T20:26:46Z","git_url":"git://github.com/Eric89GXL/scipy.git","ssh_url":"git@github.com:Eric89GXL/scipy.git","clone_url":"https://github.com/Eric89GXL/scipy.git","svn_url":"https://github.com/Eric89GXL/scipy","homepage":"http://scipy.org/","size":65308,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"scipy:master","ref":"master","sha":"7e980b057b70c8eafc15f0ac9e2724725845b6d3","user":{"login":"scipy","id":288277,"avatar_url":"https://avatars.githubusercontent.com/u/288277?v=3","gravatar_id":"","url":"https://api.github.com/users/scipy","html_url":"https://github.com/scipy","followers_url":"https://api.github.com/users/scipy/followers","following_url":"https://api.github.com/users/scipy/following{/other_user}","gists_url":"https://api.github.com/users/scipy/gists{/gist_id}","starred_url":"https://api.github.com/users/scipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scipy/subscriptions","organizations_url":"https://api.github.com/users/scipy/orgs","repos_url":"https://api.github.com/users/scipy/repos","events_url":"https://api.github.com/users/scipy/events{/privacy}","received_events_url":"https://api.github.com/users/scipy/received_events","type":"Organization","site_admin":false},"repo":{"id":1460385,"name":"scipy","full_name":"scipy/scipy","owner":{"login":"scipy","id":288277,"avatar_url":"https://avatars.githubusercontent.com/u/288277?v=3","gravatar_id":"","url":"https://api.github.com/users/scipy","html_url":"https://github.com/scipy","followers_url":"https://api.github.com/users/scipy/followers","following_url":"https://api.github.com/users/scipy/following{/other_user}","gists_url":"https://api.github.com/users/scipy/gists{/gist_id}","starred_url":"https://api.github.com/users/scipy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scipy/subscriptions","organizations_url":"https://api.github.com/users/scipy/orgs","repos_url":"https://api.github.com/users/scipy/repos","events_url":"https://api.github.com/users/scipy/events{/privacy}","received_events_url":"https://api.github.com/users/scipy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/scipy/scipy","description":"Scipy library main repository","fork":false,"url":"https://api.github.com/repos/scipy/scipy","forks_url":"https://api.github.com/repos/scipy/scipy/forks","keys_url":"https://api.github.com/repos/scipy/scipy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scipy/scipy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scipy/scipy/teams","hooks_url":"https://api.github.com/repos/scipy/scipy/hooks","issue_events_url":"https://api.github.com/repos/scipy/scipy/issues/events{/number}","events_url":"https://api.github.com/repos/scipy/scipy/events","assignees_url":"https://api.github.com/repos/scipy/scipy/assignees{/user}","branches_url":"https://api.github.com/repos/scipy/scipy/branches{/branch}","tags_url":"https://api.github.com/repos/scipy/scipy/tags","blobs_url":"https://api.github.com/repos/scipy/scipy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scipy/scipy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scipy/scipy/git/refs{/sha}","trees_url":"https://api.github.com/repos/scipy/scipy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scipy/scipy/statuses/{sha}","languages_url":"https://api.github.com/repos/scipy/scipy/languages","stargazers_url":"https://api.github.com/repos/scipy/scipy/stargazers","contributors_url":"https://api.github.com/repos/scipy/scipy/contributors","subscribers_url":"https://api.github.com/repos/scipy/scipy/subscribers","subscription_url":"https://api.github.com/repos/scipy/scipy/subscription","commits_url":"https://api.github.com/repos/scipy/scipy/commits{/sha}","git_commits_url":"https://api.github.com/repos/scipy/scipy/git/commits{/sha}","comments_url":"https://api.github.com/repos/scipy/scipy/comments{/number}","issue_comment_url":"https://api.github.com/repos/scipy/scipy/issues/comments{/number}","contents_url":"https://api.github.com/repos/scipy/scipy/contents/{+path}","compare_url":"https://api.github.com/repos/scipy/scipy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scipy/scipy/merges","archive_url":"https://api.github.com/repos/scipy/scipy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scipy/scipy/downloads","issues_url":"https://api.github.com/repos/scipy/scipy/issues{/number}","pulls_url":"https://api.github.com/repos/scipy/scipy/pulls{/number}","milestones_url":"https://api.github.com/repos/scipy/scipy/milestones{/number}","notifications_url":"https://api.github.com/repos/scipy/scipy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scipy/scipy/labels{/name}","releases_url":"https://api.github.com/repos/scipy/scipy/releases{/id}","deployments_url":"https://api.github.com/repos/scipy/scipy/deployments","created_at":"2011-03-09T18:52:03Z","updated_at":"2016-06-29T18:32:56Z","pushed_at":"2016-06-29T20:32:05Z","git_url":"git://github.com/scipy/scipy.git","ssh_url":"git@github.com:scipy/scipy.git","clone_url":"https://github.com/scipy/scipy.git","svn_url":"https://github.com/scipy/scipy","homepage":"http://scipy.org/scipylib/","size":82299,"stargazers_count":2413,"watchers_count":2413,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1404,"mirror_url":null,"open_issues_count":906,"forks":1404,"open_issues":906,"watchers":2413,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scipy/scipy/pulls/6328"},"html":{"href":"https://github.com/scipy/scipy/pull/6328"},"issue":{"href":"https://api.github.com/repos/scipy/scipy/issues/6328"},"comments":{"href":"https://api.github.com/repos/scipy/scipy/issues/6328/comments"},"review_comments":{"href":"https://api.github.com/repos/scipy/scipy/pulls/6328/comments"},"review_comment":{"href":"https://api.github.com/repos/scipy/scipy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scipy/scipy/pulls/6328/commits"},"statuses":{"href":"https://api.github.com/repos/scipy/scipy/statuses/caec9ef5158271dd5dca4ac085ca9b8e26746c48"}}}}
{"actor":{"display_login":"Eric89GXL"}}