{"action":"created","issue":{"url":"https://api.github.com/repos/scipy/scipy/issues/4908","repository_url":"https://api.github.com/repos/scipy/scipy","labels_url":"https://api.github.com/repos/scipy/scipy/issues/4908/labels{/name}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/4908/comments","events_url":"https://api.github.com/repos/scipy/scipy/issues/4908/events","html_url":"https://github.com/scipy/scipy/issues/4908","id":80894487,"number":4908,"title":"bug: unnessesary validity check for block dimension in scipy.sparse.block_diag","user":{"login":"GiggleLiu","id":6257240,"avatar_url":"https://avatars.githubusercontent.com/u/6257240?v=3","gravatar_id":"","url":"https://api.github.com/users/GiggleLiu","html_url":"https://github.com/GiggleLiu","followers_url":"https://api.github.com/users/GiggleLiu/followers","following_url":"https://api.github.com/users/GiggleLiu/following{/other_user}","gists_url":"https://api.github.com/users/GiggleLiu/gists{/gist_id}","starred_url":"https://api.github.com/users/GiggleLiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GiggleLiu/subscriptions","organizations_url":"https://api.github.com/users/GiggleLiu/orgs","repos_url":"https://api.github.com/users/GiggleLiu/repos","events_url":"https://api.github.com/users/GiggleLiu/events{/privacy}","received_events_url":"https://api.github.com/users/GiggleLiu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scipy/scipy/labels/defect","name":"defect","color":"e11d21"},{"url":"https://api.github.com/repos/scipy/scipy/labels/scipy.sparse","name":"scipy.sparse","color":"207de5"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2015-05-26T10:11:42Z","updated_at":"2016-10-26T15:34:20Z","closed_at":null,"body":"the result is that it will raise an error when any of the sub-block has a 0 dimension.\r\n\r\n<error infomation>\r\n  File \"/usr/local/lib/python2.7/dist-packages/scipy/sparse/construct.py\", line 579, in bmat\r\n    raise ValueError('blocks[:,%d] is all None' % bcol_lengths.argmin())\r\nValueError: blocks[:,0] is all None"},"comment":{"url":"https://api.github.com/repos/scipy/scipy/issues/comments/256384607","html_url":"https://github.com/scipy/scipy/issues/4908#issuecomment-256384607","issue_url":"https://api.github.com/repos/scipy/scipy/issues/4908","id":256384607,"user":{"login":"akhmerov","id":2069677,"avatar_url":"https://avatars.githubusercontent.com/u/2069677?v=3","gravatar_id":"","url":"https://api.github.com/users/akhmerov","html_url":"https://github.com/akhmerov","followers_url":"https://api.github.com/users/akhmerov/followers","following_url":"https://api.github.com/users/akhmerov/following{/other_user}","gists_url":"https://api.github.com/users/akhmerov/gists{/gist_id}","starred_url":"https://api.github.com/users/akhmerov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akhmerov/subscriptions","organizations_url":"https://api.github.com/users/akhmerov/orgs","repos_url":"https://api.github.com/users/akhmerov/repos","events_url":"https://api.github.com/users/akhmerov/events{/privacy}","received_events_url":"https://api.github.com/users/akhmerov/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T15:34:20Z","updated_at":"2016-10-26T15:34:20Z","body":"I mean zero *amount* of eigenvectors. Example code:\r\n```\r\neigvals, eigvecs = np.linalg.eigh(mat)\r\nrelevant_eigvecs = eigvecs[:, eigvals > 2]\r\n```\r\nThis can produce a 2-dimensional numpy array with one dimension being zero, and so shape `(2, 0)`. I don't have any opinion about behavior of `bmat` with a `(2,)`-shaped array as input, because that isn't even a matrix, but rather a vector."}}
{"actor":{"display_login":"akhmerov"}}