I want to pass a class object to a function. I can make it work, but I am wondering if there is a type I can assign it? I have a "minimal" example of what I am trying to do.
spec = [("a", float64),("b",float64)]
@jitclass(spec)
class SOMETHING_3():
def __init__(self):
self.a = 1.1
self.b = 2.3
def sum(self):
return self.a + self.b
@jit(float64(float64, XXX), nopython = True)
def get_sum_3(c, someobj):
d = 0
for i in range(1000):
for j in range(1000):
d += c + someobj.sum()
return d
If I remove the explict type assigment "float64(float64, XXX)" it works fine.
But is there something I can replace the XXX with to tell it is a class object I am passing.