Cannot Coerce To Or From Object In Nopython Context: Error After Python
Following up from here, Numba is finally working (after weeks) on my machine, without any weird indentation errors. I've implemented it as in the solution to the linked question.
Solution 1:
I found out somewhere that Numba doesn't recognize np.dot()
directly, and the Error: 176:22
was pointing to line 176, where I was using np.dot()
. This was the relevant line:
dot = 1. + np.dot(X1, g1) - np.dot(X1,gc)
So I cast the dot products it into floats, and it worked:
dot = 1. + float(np.dot(X1, g1)) - float(np.dot(X1,gc))
Post a Comment for "Cannot Coerce To Or From Object In Nopython Context: Error After Python"