[Numpy-discussion] TypeError: 'module' object is not callable

Jankins andyjian430074 at gmail.com
Mon Jan 11 19:03:46 EST 2010

It is very simple code:

import networkx as nx
import scipy.sparse.linalg as linalg

G = nx.Graph()
M= nx.to_scipy_sparse_matrix(G)
print linalg.eigen(M)



On 1/11/2010 5:49 PM, Robert Kern wrote:
> On Mon, Jan 11, 2010 at 17:44, Jankins<andyjian430074 at gmail.com>  wrote:
>> Hello,
>> I want to use scipy.sparse.linalg.eigen function, but it keeps popping
>> out error message:
>> TypeError: 'module' object is not callable
>> "eigen" is a module, but it has "__call__" method. Why couldn't I call
>> scipy.sparse.linalg.eigen(...)?
> Please show the complete code and the complete traceback.

More information about the NumPy-Discussion mailing list