I know that the Numba supports python type annotations in the @jitclass. But is it possible to use python annotation for the recursive types? Here is the code snippet:
from __future__ import annotations
from numba.experimental import jitclass
#@jitclass
class OctNode:
parent: OctNode
children: list[OctNode]
def __init__(self, parent: OctNode = None):
self.parent = parent
self.children = None
def create_children(self):
self.children = [OctNode(self)] * 8
def main():
node = OctNode()
node.create_children()