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

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -