{"action":"created","issue":{"url":"https://api.github.com/repos/scipy/scipy/issues/3107","labels_url":"https://api.github.com/repos/scipy/scipy/issues/3107/labels{/name}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/3107/comments","events_url":"https://api.github.com/repos/scipy/scipy/issues/3107/events","html_url":"https://github.com/scipy/scipy/pull/3107","id":23588154,"number":3107,"title":"ENH: Add ordered QZ decomposition","user":{"login":"jseabold","id":296164,"avatar_url":"https://avatars.githubusercontent.com/u/296164?v=3","gravatar_id":"","url":"https://api.github.com/users/jseabold","html_url":"https://github.com/jseabold","followers_url":"https://api.github.com/users/jseabold/followers","following_url":"https://api.github.com/users/jseabold/following{/other_user}","gists_url":"https://api.github.com/users/jseabold/gists{/gist_id}","starred_url":"https://api.github.com/users/jseabold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jseabold/subscriptions","organizations_url":"https://api.github.com/users/jseabold/orgs","repos_url":"https://api.github.com/users/jseabold/repos","events_url":"https://api.github.com/users/jseabold/events{/privacy}","received_events_url":"https://api.github.com/users/jseabold/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scipy/scipy/labels/enhancement","name":"enhancement","color":"bfe5bf"},{"url":"https://api.github.com/repos/scipy/scipy/labels/scipy.linalg","name":"scipy.linalg","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/scipy/scipy/milestones/26","html_url":"https://github.com/scipy/scipy/milestones/0.17.0","labels_url":"https://api.github.com/repos/scipy/scipy/milestones/26/labels","id":1096839,"number":26,"title":"0.17.0","description":"","creator":{"login":"rgommers","id":98330,"avatar_url":"https://avatars.githubusercontent.com/u/98330?v=3","gravatar_id":"","url":"https://api.github.com/users/rgommers","html_url":"https://github.com/rgommers","followers_url":"https://api.github.com/users/rgommers/followers","following_url":"https://api.github.com/users/rgommers/following{/other_user}","gists_url":"https://api.github.com/users/rgommers/gists{/gist_id}","starred_url":"https://api.github.com/users/rgommers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgommers/subscriptions","organizations_url":"https://api.github.com/users/rgommers/orgs","repos_url":"https://api.github.com/users/rgommers/repos","events_url":"https://api.github.com/users/rgommers/events{/privacy}","received_events_url":"https://api.github.com/users/rgommers/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":247,"state":"open","created_at":"2015-05-05T13:00:06Z","updated_at":"2015-11-24T08:28:54Z","due_on":"2015-11-29T23:00:00Z","closed_at":null},"comments":65,"created_at":"2013-12-02T17:33:48Z","updated_at":"2015-11-24T17:06:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/scipy/scipy/pulls/3107","html_url":"https://github.com/scipy/scipy/pull/3107","diff_url":"https://github.com/scipy/scipy/pull/3107.diff","patch_url":"https://github.com/scipy/scipy/pull/3107.patch"},"body":"This currently segfaults. I don't know why. I spent some time checking the wrapper definitions and stepping through with gdb. I didn't notice anything that was obvious to me. If someone else wants to give it a go, this was the working script I was using. If someone can figure out the segfault, I'll take it the rest of the way, but I just don't have time to mess with this.\r\n\r\n```\r\nA = [[-21.10-22.50j, 53.5-50.5j, -34.5+127.5j,   7.5+ 0.5j],\r\n[ -0.46- 7.78j, -3.5-37.5j, -15.5+ 58.5j, -10.5- 1.5j],\r\n[  4.30- 5.50j, 39.7-17.1j, -68.5+ 12.5j,  -7.5- 3.5j],\r\n[  5.50+ 4.40j, 14.4+43.3j, -32.5- 46.0j, -19.0-32.5j]]\r\nB = [[1.0-5.0j,  1.6+1.2j, -3+0j,  0.0-1.0j],\r\n[0.8-0.6j,  3.0-5.0j, -4+3j, -2.4-3.2j],\r\n[1.0+0.0j,  2.4+1.8j, -4-5j,  0.0-3.0j],\r\n[0.0+1.0j, -1.8+2.4j,  0-4j,  4.0-5.0j]]\r\n\r\nA = [[3.9, 12.5, -34.5, -0.5],\r\n[4.3, 21.5, -47.5,  7.5],\r\n[4.3, 21.5, -43.5,  3.5],\r\n[4.4, 26.0, -46.0,  6.0]]\r\n\r\nB = [[  1,    2,   -3,    1],\r\n[  1,    3,   -5,    4],\r\n[  1,    3,   -4,    3],\r\n[  1,    3,   -4,    4]]\r\n\r\n\r\nfrom scipy.linalg._decomp_qz import ordqz, _qz, _select_function, get_lapack_funcs\r\noutput = 'real'\r\nlwork = None\r\noverwrite_a = False\r\noverwrite_b = False\r\ncheck_finite = True\r\nsort = 'lhp'\r\nresult, typ = _qz(A, B, output=output, lwork=lwork, sort=None,\r\n                 overwrite_a=overwrite_a, overwrite_b=overwrite_b,\r\n                 check_finite=check_finite)\r\nAA, BB, Q, Z = result[0], result[1], result[-4], result[-3]\r\nalpha, beta = result[3], result[4]\r\nsfunction = _select_function(sort, typ)\r\nselect = sfunction(alpha, beta)\r\ntgsen, = get_lapack_funcs(('tgsen',), (AA,BB))\r\n\r\nn = len(A)\r\nm = 0.\r\nlwork = 2*m*(n-m)\r\nliwork = n+2\r\n#result = tgsen(select, AA, BB, Q, Z, lwork=-1, liwork=AA.shape[1]*2)\r\nresult = tgsen(select, AA, BB, Q, Z)\r\n```"},"comment":{"url":"https://api.github.com/repos/scipy/scipy/issues/comments/159341289","html_url":"https://github.com/scipy/scipy/pull/3107#issuecomment-159341289","issue_url":"https://api.github.com/repos/scipy/scipy/issues/3107","id":159341289,"user":{"login":"jseabold","id":296164,"avatar_url":"https://avatars.githubusercontent.com/u/296164?v=3","gravatar_id":"","url":"https://api.github.com/users/jseabold","html_url":"https://github.com/jseabold","followers_url":"https://api.github.com/users/jseabold/followers","following_url":"https://api.github.com/users/jseabold/following{/other_user}","gists_url":"https://api.github.com/users/jseabold/gists{/gist_id}","starred_url":"https://api.github.com/users/jseabold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jseabold/subscriptions","organizations_url":"https://api.github.com/users/jseabold/orgs","repos_url":"https://api.github.com/users/jseabold/repos","events_url":"https://api.github.com/users/jseabold/events{/privacy}","received_events_url":"https://api.github.com/users/jseabold/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T17:06:36Z","updated_at":"2015-11-24T17:06:36Z","body":"Did a bit of cleanup."}}