-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Hi,
I'm trying out pyviennacl, it sounds great so far. I can run some test code, so the setup seems to be ok. (Py 2.7 on 64bit Windows 7).
But when I try pyviennacl.linalg.solve() I'm getting an error where I'm stuck. Here's the code:
import numpy as n
import pyviennacl as p
Amat = n.random.rand(20,20).astype(n.float32)
Bvec = n.random.rand(20).astype(n.float32)
pvA = p.Matrix(Amat)
pvB = p.Vector(Bvec)
mysolvertag = p.linalg.cg_tag()
mysolvertag = p.linalg.gmres_tag()
result = p.linalg.solve(pvA, pvB, mysolvertag)
print(result)
And here's the beginning of the error message:
Traceback (most recent call last):File "", line 1, in
runfile('<path_removed>/pvcltest.py', wdir='<path_removed>')
File "C:\ANACONDA\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 580, in runfile
execfile(filename, namespace)
File "<path_removed>/pvcltest.py", line 19, in
result = p.linalg.solve(pvA, pvB, mysolvertag)
File "C:\ANACONDA\lib\site-packages\pyviennacl\linalg.py", line 474, in solve
return result_type(tag.vcl_solve_call(A.vcl_leaf, B.vcl_leaf, tag.vcl_tag),
File "C:\ANACONDA\lib\site-packages\pyviennacl\linalg.py", line 177, in vcl_solve_call
return _v.iterative_solve(*args)
ArgumentError: Python argument types in
pyviennacl._viennacl.iterative_solve(matrix_row_float, vector_float, gmres_tag)
did not match C++ signature:
iterative_solve(class viennacl::hyb_matrix<double,1> {lvalue}, class viennacl::vector<double,1> {lvalue}, class viennacl::linalg::gmres_tag {lvalue})
Is there some (stupid...) mistake in my code snippet, or is there a problem with pyviennacl?
Thanks,
sven