Hi all, I am wondering if it is possible to return a scalar from guvectorize.
I was able to do it in python2.7. Here is the dummy code
@guvectorize([(int64,float64[:],float64[:])], '(),(N)->()', target='cuda')
def f(i,theta,res):
res[0] = -1.0
Now I switched to python3.6 and it does not work anymore. It gives error: signature=(int64, array(float64, 1d, A), array(float64, 1d, A)) -> none>) with parameters (int64, array(float64, 1d, A), float64)
The error is self-explanatory and I guess I just got lucky with python2. I cannot use @vectorize because the parameter theta is a vector. Any ideas? Thank you!