Here is a simpler version of a method that returns a tuple. This works for me using Numba 0.11.1 on OS X:
import numba
import numpy as np
@numba.jit
class name(object):
@numba.object_(numba.double[:], numba.double)
def solve(self, x, a):
y = np.empty(x.shape[0], dtype=np.float64)
z = np.empty(x.shape[0], dtype=np.float64)
for k in xrange(x.shape[0]):
y[k] = x[k] * a
z[k] = x[k] + a
return y, z
Then using it:
C = name()
a, b = C.solve(np.arange(5, dtype=np.float64), 3.0)
Where a
and b
are:
In [24]: a
Out[24]:
array([ 0., 3., 6., 9., 12.])
In [22]: b
Out[22]:
array([ 3., 4., 5., 6., 7.])