Open giucesar opened 1 year ago
Lucky! While testing again, I by mistake, removed the first line of the code:
from __future__ import annotations
it now works! looks like there is a conflict in how taichi interprets type hints with annotations enabled.
Describe the bug I am getting invalid type annotation no matter how I write my kernel.
To Reproduce I got the example in the FAQ section (https://docs.taichi-lang.org/docs/faq), and it gives me:
taichi.lang.exception.TaichiSyntaxError: Invalid type annotation (argument 0) of Taichi kernel: ti.types.ndarray()
I even changed from python 3.10 to 3.9 and the exactly same exception persists.