I want to create a field in a Jitclass to store a single Record object.
As I understand it, a numba Record object represents a single element from a structured numpy array. Please correct me if I am wrong.
I have tried to achieve this with the following code:
dt = np.dtype([(‘a’, np.bool_),(‘b’, np.bool_)])
arr = np.array([(True, False)], dt)
spec={‘field1’: numba.typeof(arr[0])}
class Testclass:
def init(self, signals) → None:
self.signals = signals
Testclass = jitclass(Testclass, spec)
Testclass(arr[0])
However, this produces the following error:
How can this be achieved? And is there a place in the documentation where I should have been able to find a solution for this?
Thanks in advance.
~Boris