{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/12605","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/12605/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/12605/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/12605/events","html_url":"https://github.com/JuliaLang/julia/issues/12605","id":100803016,"number":12605,"title":"A keepzeros option for sparse(I, J, V)","user":{"login":"matthieugomez","id":6223837,"avatar_url":"https://avatars.githubusercontent.com/u/6223837?v=3","gravatar_id":"","url":"https://api.github.com/users/matthieugomez","html_url":"https://github.com/matthieugomez","followers_url":"https://api.github.com/users/matthieugomez/followers","following_url":"https://api.github.com/users/matthieugomez/following{/other_user}","gists_url":"https://api.github.com/users/matthieugomez/gists{/gist_id}","starred_url":"https://api.github.com/users/matthieugomez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matthieugomez/subscriptions","organizations_url":"https://api.github.com/users/matthieugomez/orgs","repos_url":"https://api.github.com/users/matthieugomez/repos","events_url":"https://api.github.com/users/matthieugomez/events{/privacy}","received_events_url":"https://api.github.com/users/matthieugomez/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/sparse","name":"sparse","color":"fad8c7"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-13T15:45:58Z","updated_at":"2015-08-13T17:55:20Z","closed_at":"2015-08-13T16:18:16Z","body":"`sparse` currently consider zeros element in V as structural zeros\r\n\r\n```julia\r\nI = [1, 2]\r\nJ = [1,2]\r\nV = [0, 1]\r\nM = sparse(I, J, V)\r\n# 2x2 sparse matrix with 1 Int64 entries:\r\n# [2, 2]  =  1\r\n```\r\nThis means the sparsity structure of M depends on the values of V, and not only of the pair (I, J). So there is no way to initialize a sparse matrix with the \"correct\" sparsity structure, independently of its values V. This is problematic since it's inefficient to modify the structure of a sparse matrix.\r\n\r\nWhy can't `sparse` consider zeros element in V as non structural zeros? I'm not sure how other programming languages handle this situation so I'm looking for some feedback before making a pull request."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/130779919","html_url":"https://github.com/JuliaLang/julia/issues/12605#issuecomment-130779919","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/12605","id":130779919,"user":{"login":"ViralBShah","id":744411,"avatar_url":"https://avatars.githubusercontent.com/u/744411?v=3","gravatar_id":"","url":"https://api.github.com/users/ViralBShah","html_url":"https://github.com/ViralBShah","followers_url":"https://api.github.com/users/ViralBShah/followers","following_url":"https://api.github.com/users/ViralBShah/following{/other_user}","gists_url":"https://api.github.com/users/ViralBShah/gists{/gist_id}","starred_url":"https://api.github.com/users/ViralBShah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ViralBShah/subscriptions","organizations_url":"https://api.github.com/users/ViralBShah/orgs","repos_url":"https://api.github.com/users/ViralBShah/repos","events_url":"https://api.github.com/users/ViralBShah/events{/privacy}","received_events_url":"https://api.github.com/users/ViralBShah/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T17:55:20Z","updated_at":"2015-08-13T17:55:20Z","body":"I am reopening this issue to track the `keepzeros` option, which is different enough than the other related sparse issues. "}}