{"action":"created","issue":{"url":"https://api.github.com/repos/scipy/scipy/issues/8906","repository_url":"https://api.github.com/repos/scipy/scipy","labels_url":"https://api.github.com/repos/scipy/scipy/issues/8906/labels{/name}","comments_url":"https://api.github.com/repos/scipy/scipy/issues/8906/comments","events_url":"https://api.github.com/repos/scipy/scipy/issues/8906/events","html_url":"https://github.com/scipy/scipy/issues/8906","id":329455135,"node_id":"MDU6SXNzdWUzMjk0NTUxMzU=","number":8906,"title":"solve_banded erroneously special-cases 1x1 matrices","user":{"login":"MattShannon","id":752825,"node_id":"MDQ6VXNlcjc1MjgyNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/752825?v=4","gravatar_id":"","url":"https://api.github.com/users/MattShannon","html_url":"https://github.com/MattShannon","followers_url":"https://api.github.com/users/MattShannon/followers","following_url":"https://api.github.com/users/MattShannon/following{/other_user}","gists_url":"https://api.github.com/users/MattShannon/gists{/gist_id}","starred_url":"https://api.github.com/users/MattShannon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattShannon/subscriptions","organizations_url":"https://api.github.com/users/MattShannon/orgs","repos_url":"https://api.github.com/users/MattShannon/repos","events_url":"https://api.github.com/users/MattShannon/events{/privacy}","received_events_url":"https://api.github.com/users/MattShannon/received_events","type":"User","site_admin":false},"labels":[{"id":37334597,"node_id":"MDU6TGFiZWwzNzMzNDU5Nw==","url":"https://api.github.com/repos/scipy/scipy/labels/defect","name":"defect","color":"e11d21","default":false},{"id":37340991,"node_id":"MDU6TGFiZWwzNzM0MDk5MQ==","url":"https://api.github.com/repos/scipy/scipy/labels/scipy.linalg","name":"scipy.linalg","color":"207de5","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-06-05T13:24:40Z","updated_at":"2018-06-05T14:55:41Z","closed_at":null,"author_association":"NONE","body":"The new version of solve_banded special-cases 1x1 matrices. However it does so incorrectly. The line here:\r\n\r\nhttps://github.com/scipy/scipy/blob/272b2edc4d44d854b7fa75729da248bb1f934c0a/scipy/linalg/basic.py#L447\r\n\r\nis only correct if u is 1. Typically u will be 0 (since the upper bands lie outside the 1x1 matrix), but arbitrary u should be supported just as for the rest of the code. I believe changing a[1, 0] to a[u, 0] should be sufficient."},"comment":{"url":"https://api.github.com/repos/scipy/scipy/issues/comments/394740924","html_url":"https://github.com/scipy/scipy/issues/8906#issuecomment-394740924","issue_url":"https://api.github.com/repos/scipy/scipy/issues/8906","id":394740924,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDc0MDkyNA==","user":{"login":"MattShannon","id":752825,"node_id":"MDQ6VXNlcjc1MjgyNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/752825?v=4","gravatar_id":"","url":"https://api.github.com/users/MattShannon","html_url":"https://github.com/MattShannon","followers_url":"https://api.github.com/users/MattShannon/followers","following_url":"https://api.github.com/users/MattShannon/following{/other_user}","gists_url":"https://api.github.com/users/MattShannon/gists{/gist_id}","starred_url":"https://api.github.com/users/MattShannon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MattShannon/subscriptions","organizations_url":"https://api.github.com/users/MattShannon/orgs","repos_url":"https://api.github.com/users/MattShannon/repos","events_url":"https://api.github.com/users/MattShannon/events{/privacy}","received_events_url":"https://api.github.com/users/MattShannon/received_events","type":"User","site_admin":false},"created_at":"2018-06-05T14:55:41Z","updated_at":"2018-06-05T14:55:41Z","author_association":"NONE","body":"Yeah, it wouldn't be entirely unreasonable to use a[0, 0] and raise an exception if u is anything other than 0.\r\n\r\nHowever iirc that's inconsistent with the behavior of the rest of the function (which allows u or l to be larger than the total number of upper or lower diagonals in the corresponding full matrix), and there's no reason to disallow l and u having larger values than could possibly affect the entries in the full matrix. So I think the best thing is just to change it to a[u, 0].\r\n\r\nHappy to have a go at a PR, but it won't be right away."}}
{"actor":{"display_login":"MattShannon"}}