I am using a python function called \"incidence_matrix(G)\", which returns the incident matrix of graph. It is from Networkx package. The problem that I am facing is the ret
I found that in the case of csr matrices, todense()
and toarray()
simply wrapped the tuples rather than producing a ndarray formatted version of the data in matrix form. This was unusable for the skmultilearn classifiers I'm training.
I translated it to a lil matrix- a format numpy can parse accurately, and then ran toarray()
on that:
sparse.lil_matrix().toarray()