I have Numba 0.24 and it supports classes.
When I try to build the simplest class I can imagine I find an error! What's happening?
from numba import jitclass
@jitclass
class foo:
x = 2
bar = foo()
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-3e0fd8d4bd2b> in <module>()
3 class foo:
4 x = 2
----> 5 bar = foo()
TypeError: wrap() missing 1 required positional argument: 'cls'
Am I missing something here?
You need to specify a spec:
Take a look at the docs. At this point class variables are not supported. You have to use instance variables.