scipy - numpy.sum() gives `TypeError: sum() got an unexpected keyword argument 'dtype'` -



scipy - numpy.sum() gives `TypeError: sum() got an unexpected keyword argument 'dtype'` -

the next code generated unexpected typeerror:

import scipy.sparse import numpy coomatrix = scipy.sparse.coo_matrix((100,100)) numpy.sum(coomatrix)

the result:

typeerror: sum() got unexpected keyword argument 'dtype'

scipy version 0.14.0, numpy version 1.9.0

the problem numpy.sum doesn't know how handle sparse matrices. next works expected:

coomatrix.sum()

numpy scipy sparse-matrix

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -