sin123
sin123

Reputation: 23

Error while calculating eigen vectors and eigen values using the modred module in python

I am trying to calculate the orthogonal decompositions using the modred module in python.

When the code executes the following lines:

> myPOD = mr.PODHandles(inner_product,max_vecs_per_node=20) eigvals,
> eigvecs = myPOD.compute_decomp(vec_handles)

I am getting the following error. I don't understand the error since I am very new to python.

Traceback (most recent call last):

File "podd.py", line 147, in <module>
    eigvals, eigvecs = myPOD.compute_decomp(vec_handles)  
File "/home/sindhuja/.local/lib/python2.7/site-packages/modred/pod.py", line 326, in compute_decomp
    self.compute_eigendecomp(atol=atol, rtol=rtol)  
File "/home/sindhuja/.local/lib/python2.7/site-packages/modred/pod.py", line 301, in compute_eigendecomp
    is_positive_definite=True)   
File "/home/sindhuja/.local/lib/python2.7/site-packages/modred/parallel.py", line 216, in call_and_bcast
    outputs = func(*args, **kwargs)   
File "/home/sindhuja/.local/lib/python2.7/site-packages/modred/util.py", line 250, in eigh
    eigvals, eigvecs = np.linalg.eigh(np.mat(mat))  
File "/home/sindhuja/.local/lib/python2.7/site-packages/numpy/linalg/linalg.py", line 1291, in eigh
    w, vt = gufunc(a, signature=signature, extobj=extobj) 
TypeError: No loop matching the specified signature and casting was found for ufunc eigh_lo

How do I deal with this error?

Upvotes: 0

Views: 95

Answers (1)

sunxx
sunxx

Reputation: 1

Try this:

eigvals, eigvecs = myPOD_compute_decomp(vec_handles)

This function returns two arguments, but you only give one.

Upvotes: 0

Related Questions