Hi all, I was using python2.7 and guvectorize function to return a scalar and it works fine. Here is the dummy code
@guvectorize(['void(int64, float64[:], float64[:])'], '(),(N) -> ()', target='cuda')
def p_neg_gpu(i,theta,res):
res[0]=1.0
But now I switched to python3.6 and it does work anymore because of signature error: res is declared as float64[:] but its size is () which is a scalar. So I am confused. Any thoughts?
Some clarifications: One parameter for the function is an array so I can't use @vectorize (or can I?).
Thank you!
Best,
Bill