{"action":"closed","issue":{"url":"https://api.github.com/repos/weijianzhang/MatrixDepot.jl/issues/17","labels_url":"https://api.github.com/repos/weijianzhang/MatrixDepot.jl/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/weijianzhang/MatrixDepot.jl/issues/17/comments","events_url":"https://api.github.com/repos/weijianzhang/MatrixDepot.jl/issues/17/events","html_url":"https://github.com/weijianzhang/MatrixDepot.jl/issues/17","id":103932737,"number":17,"title":"Matrices without values load as -1","user":{"login":"jpfairbanks","id":2753998,"avatar_url":"https://avatars.githubusercontent.com/u/2753998?v=3","gravatar_id":"","url":"https://api.github.com/users/jpfairbanks","html_url":"https://github.com/jpfairbanks","followers_url":"https://api.github.com/users/jpfairbanks/followers","following_url":"https://api.github.com/users/jpfairbanks/following{/other_user}","gists_url":"https://api.github.com/users/jpfairbanks/gists{/gist_id}","starred_url":"https://api.github.com/users/jpfairbanks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpfairbanks/subscriptions","organizations_url":"https://api.github.com/users/jpfairbanks/orgs","repos_url":"https://api.github.com/users/jpfairbanks/repos","events_url":"https://api.github.com/users/jpfairbanks/events{/privacy}","received_events_url":"https://api.github.com/users/jpfairbanks/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-30T16:22:30Z","updated_at":"2015-09-11T12:53:31Z","closed_at":"2015-09-11T12:53:31Z","body":"If the mtx file has a blank 3rd column, matrixdepot loads the matrix with values -1.\r\nFor example the Newman/polbooks matrix now edge weights (values column is empty)\r\nThis works on Newman/football which provides the values column as ones(n).\r\nIs this a bug or the intended behavior? If intended, why?\r\n```julia\r\njulia> using MatrixDepot; a = matrixdepot(\"Newman/polbooks\", :r)[1:10,1:10]\r\n10x10 Array{Float64,2}:\r\n  0.0  -1.0  -1.0  -1.0  -1.0  -1.0  -1.0   0.0   0.0   0.0\r\n -1.0   0.0   0.0  -1.0   0.0  -1.0  -1.0   0.0   0.0   0.0\r\n -1.0   0.0   0.0   0.0  -1.0  -1.0   0.0  -1.0   0.0   0.0\r\n -1.0  -1.0   0.0   0.0   0.0  -1.0   0.0   0.0  -1.0  -1.0\r\n -1.0   0.0  -1.0   0.0   0.0  -1.0  -1.0   0.0   0.0   0.0\r\n -1.0  -1.0  -1.0  -1.0  -1.0   0.0  -1.0  -1.0   0.0   0.0\r\n -1.0  -1.0   0.0   0.0  -1.0  -1.0   0.0  -1.0   0.0   0.0\r\n  0.0   0.0  -1.0   0.0   0.0  -1.0  -1.0   0.0   0.0   0.0\r\n  0.0   0.0   0.0  -1.0   0.0   0.0   0.0   0.0   0.0  -1.0\r\n  0.0   0.0   0.0  -1.0   0.0   0.0   0.0   0.0  -1.0   0.0\r\n```\r\n\r\nHere are the files\r\n```\r\n> head -n 50 polbooks.mtx                                                    /h/j/./v/M/d/u/Newman (git)-[master] \r\n%%MatrixMarket matrix coordinate pattern symmetric\r\n%-------------------------------------------------------------------------------\r\n% UF Sparse Matrix Collection, Tim Davis\r\n% http://www.cise.ufl.edu/research/sparse/matrices/Newman/polbooks\r\n% name: Newman/polbooks\r\n% [Books about US politics, compiled by V. Krebs]\r\n% id: 2403\r\n% date: 2001\r\n% author: V. Krebs\r\n% ed: M. Newman\r\n% fields: name title A id date author kind notes aux ed\r\n% aux: nodename nodevalue\r\n% kind: undirected graph\r\n%-------------------------------------------------------------------------------\r\n% notes:\r\n% Network collection from M. Newman                                         \r\n% http://www-personal.umich.edu/~mejn/netdata/                              \r\n%                                                                           \r\n% Books about US politics                                                   \r\n% Compiled by Valdis Krebs                                                  \r\n%                                                                           \r\n% Nodes represent books about US politics sold by the online bookseller     \r\n% Amazon.com.  Edges represent frequent co-purchasing of books by the same  \r\n% buyers, as indicated by the \"customers who bought this book also bought   \r\n% these other books\" feature on Amazon.                                     \r\n%                                                                           \r\n% Nodes have been given values \"l\", \"n\", or \"c\" to indicate whether they are\r\n% \"liberal\", \"neutral\", or \"conservative\".  These alignments were assigned  \r\n% separately by Mark Newman based on a reading of the descriptions and      \r\n% reviews of the books posted on Amazon.                                    \r\n%                                                                           \r\n% These data should be cited as V. Krebs, unpublished,                      \r\n% http://www.orgnet.com/.                                                   \r\n%-------------------------------------------------------------------------------\r\n105 105 441\r\n2 1\r\n3 1\r\n4 1\r\n5 1\r\n6 1\r\n7 1\r\n4 2\r\n6 2\r\n7 2\r\n5 3\r\n6 3\r\n8 3\r\n6 4\r\n9 4\r\n10 4\r\n```\r\n\r\n```\r\n> head -n 50 football.mtx                                                    /h/j/./v/M/d/u/Newman (git)-[master] \r\n%%MatrixMarket matrix coordinate integer symmetric\r\n%-------------------------------------------------------------------------------\r\n% UF Sparse Matrix Collection, Tim Davis\r\n% http://www.cise.ufl.edu/research/sparse/matrices/Newman/football\r\n% name: Newman/football\r\n% [American football games between Div IA colleges, Fall 2000]\r\n% id: 2397\r\n% date: 2002\r\n% author: M. Girvan, M. Newman\r\n% ed: M. Newman\r\n% fields: name title A id date author kind notes aux ed\r\n% aux: nodename nodevalue\r\n% kind: undirected multigraph\r\n%-------------------------------------------------------------------------------\r\n% notes:\r\n% Network collection from M. Newman                                        \r\n% http://www-personal.umich.edu/~mejn/netdata/                             \r\n%                                                                          \r\n% The graph football contains the network of American football games       \r\n% between Division IA colleges during regular season Fall 2000, as compiled\r\n% by M. Girvan and M. Newman.  The nodes have values that indicate to which\r\n% conferences they belong.  The values are as follows:                     \r\n%                                                                          \r\n%   0 = Atlantic Coast                                                     \r\n%   1 = Big East                                                           \r\n%   2 = Big Ten                                                            \r\n%   3 = Big Twelve                                                         \r\n%   4 = Conference USA                                                     \r\n%   5 = Independents                                                       \r\n%   6 = Mid-American                                                       \r\n%   7 = Mountain West                                                      \r\n%   8 = Pacific Ten                                                        \r\n%   9 = Southeastern                                                       \r\n%  10 = Sun Belt                                                           \r\n%  11 = Western Athletic                                                   \r\n%                                                                          \r\n% If you make use of these data, please cite M. Girvan and M. E. J. Newman,\r\n% Community structure in social and biological networks,                   \r\n% Proc. Natl. Acad. Sci. USA 99, 7821-7826 (2002).                         \r\n%-------------------------------------------------------------------------------\r\n115 115 613\r\n2 1 1\r\n5 1 1\r\n10 1 1\r\n17 1 1\r\n24 1 1\r\n34 1 1\r\n36 1 1\r\n42 1 1\r\n66 1 1\r\n```"}}