{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/19561","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/19561/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/19561/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/19561/events","html_url":"https://github.com/JuliaLang/julia/issues/19561","id":194884848,"number":19561,"title":"`map` on sparse arrays does not work with non-numeric data","user":{"login":"amitmurthy","id":117461,"avatar_url":"https://avatars.githubusercontent.com/u/117461?v=3","gravatar_id":"","url":"https://api.github.com/users/amitmurthy","html_url":"https://github.com/amitmurthy","followers_url":"https://api.github.com/users/amitmurthy/followers","following_url":"https://api.github.com/users/amitmurthy/following{/other_user}","gists_url":"https://api.github.com/users/amitmurthy/gists{/gist_id}","starred_url":"https://api.github.com/users/amitmurthy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amitmurthy/subscriptions","organizations_url":"https://api.github.com/users/amitmurthy/orgs","repos_url":"https://api.github.com/users/amitmurthy/repos","events_url":"https://api.github.com/users/amitmurthy/events{/privacy}","received_events_url":"https://api.github.com/users/amitmurthy/received_events","type":"User","site_admin":false},"labels":[{"id":47509082,"url":"https://api.github.com/repos/JuliaLang/julia/labels/regression","name":"regression","color":"ff2510","default":false},{"id":94575532,"url":"https://api.github.com/repos/JuliaLang/julia/labels/sparse","name":"sparse","color":"fad8c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-12-12T03:44:29Z","updated_at":"2016-12-12T20:28:03Z","closed_at":null,"body":"```\r\njulia> map(x-> x != 0.0 ? \"Hello\" : x, sparse(eye(4)))\r\nERROR: MethodError: no method matching zero(::Type{Any})\r\n```\r\n\r\nAlso a problem when mixing ints and floats.\r\n```\r\njulia> map(x-> x != 0.0 ? 1 : x, sparse(eye(4)))\r\nERROR: MethodError: no method matching zero(::Type{Any})\r\n```\r\n\r\nIf sparse arrays are not meant to be used with non-numeric data, we should at least throw a better error message. "},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/266543147","html_url":"https://github.com/JuliaLang/julia/issues/19561#issuecomment-266543147","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/19561","id":266543147,"user":{"login":"nalimilan","id":1120448,"avatar_url":"https://avatars.githubusercontent.com/u/1120448?v=3","gravatar_id":"","url":"https://api.github.com/users/nalimilan","html_url":"https://github.com/nalimilan","followers_url":"https://api.github.com/users/nalimilan/followers","following_url":"https://api.github.com/users/nalimilan/following{/other_user}","gists_url":"https://api.github.com/users/nalimilan/gists{/gist_id}","starred_url":"https://api.github.com/users/nalimilan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nalimilan/subscriptions","organizations_url":"https://api.github.com/users/nalimilan/orgs","repos_url":"https://api.github.com/users/nalimilan/repos","events_url":"https://api.github.com/users/nalimilan/events{/privacy}","received_events_url":"https://api.github.com/users/nalimilan/received_events","type":"User","site_admin":false},"created_at":"2016-12-12T20:28:03Z","updated_at":"2016-12-12T20:28:03Z","body":"But how would `iszero` help here? We wouldn't define it on `Symbol`, `String` nor `Function`, right?"}}
{"actor":{"display_login":"nalimilan"}}