{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/12574","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/12574/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/12574/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/12574/events","html_url":"https://github.com/JuliaLang/julia/pull/12574","id":100399431,"number":12574,"title":"Add tril and triu for special matrices","user":{"login":"kshyatt","id":828643,"avatar_url":"https://avatars.githubusercontent.com/u/828643?v=3","gravatar_id":"","url":"https://api.github.com/users/kshyatt","html_url":"https://github.com/kshyatt","followers_url":"https://api.github.com/users/kshyatt/followers","following_url":"https://api.github.com/users/kshyatt/following{/other_user}","gists_url":"https://api.github.com/users/kshyatt/gists{/gist_id}","starred_url":"https://api.github.com/users/kshyatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kshyatt/subscriptions","organizations_url":"https://api.github.com/users/kshyatt/orgs","repos_url":"https://api.github.com/users/kshyatt/repos","events_url":"https://api.github.com/users/kshyatt/events{/privacy}","received_events_url":"https://api.github.com/users/kshyatt/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/linear%20algebra","name":"linear algebra","color":"aa8800"},{"url":"https://api.github.com/repos/JuliaLang/julia/labels/test","name":"test","color":"e102d8"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-08-11T20:18:36Z","updated_at":"2015-08-12T04:05:14Z","closed_at":"2015-08-12T02:50:49Z","pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/12574","html_url":"https://github.com/JuliaLang/julia/pull/12574","diff_url":"https://github.com/JuliaLang/julia/pull/12574.diff","patch_url":"https://github.com/JuliaLang/julia/pull/12574.patch"},"body":"As discussed in #9990, `Diagonal`, `Bidiagonal`, `Tridiagonal`, `SymTridiagonal`, `UpperTriangular`, `LowerTriangular`, `UnitUpperTriangular`, `UnitLowerTriangular`, `Symmetric`, and `Hermitian` types didn't have `tril` or `triu` defined. `Diagonal` had `tril!` and `triu!` but the `!` was incorrect since the underlying matrix wasn't modified.\r\n\r\nI also added tests."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/130154099","html_url":"https://github.com/JuliaLang/julia/pull/12574#issuecomment-130154099","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/12574","id":130154099,"user":{"login":"tkelman","id":5934628,"avatar_url":"https://avatars.githubusercontent.com/u/5934628?v=3","gravatar_id":"","url":"https://api.github.com/users/tkelman","html_url":"https://github.com/tkelman","followers_url":"https://api.github.com/users/tkelman/followers","following_url":"https://api.github.com/users/tkelman/following{/other_user}","gists_url":"https://api.github.com/users/tkelman/gists{/gist_id}","starred_url":"https://api.github.com/users/tkelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkelman/subscriptions","organizations_url":"https://api.github.com/users/tkelman/orgs","repos_url":"https://api.github.com/users/tkelman/repos","events_url":"https://api.github.com/users/tkelman/events{/privacy}","received_events_url":"https://api.github.com/users/tkelman/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T04:05:14Z","updated_at":"2015-08-12T04:05:14Z","body":"I think I like that option. Instead of using `zeros`, the in-place versions could do `fill!(0, `.\r\n\r\nThe only tricky case is the non-type-stable branches for `SymTridiagonal`."}}