-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@ti.func type hint error when using vector type #8042
Comments
It fails because you're directly using a python-scope Matrix
Or define
|
Just checked that the code works in v1.3.0 and fails for v1.4.0 |
hmmm, let me dig into this further |
jim19930609
added a commit
that referenced
this issue
Jun 19, 2023
…8197) Issue: fix #8042 #8114 ### Brief Summary <!-- copilot:summary --> ### <samp>🤖 Generated by Copilot at da679b9</samp> Add support for Python matrices and functions in Taichi kernels. Update `get_var_by_name` to handle `Matrix` objects and add a new test case in `test_matrix.py`. ### Walkthrough <!-- copilot:walkthrough --> ### <samp>🤖 Generated by Copilot at da679b9</samp> * Enable using Python matrices and functions in Taichi kernels by: - Converting `Matrix` objects to `ti.Matrix` objects in `get_var_by_name` ([link](https://github.com/taichi-dev/taichi/pull/8197/files?diff=unified&w=0#diff-3c4fc72604c650382997de2541e648ef88ee8f608a9e3d3ebbe7e6a74cb2eec8L258-R263)) - Adding a new test case for the matrix and function feature in `test_matrix.py` ([link](https://github.com/taichi-dev/taichi/pull/8197/files?diff=unified&w=0#diff-28226020cc3cc2e223eb43801fa78360d006c26d7140c3b37719faf9e9df34f7R6), [link](https://github.com/taichi-dev/taichi/pull/8197/files?diff=unified&w=0#diff-28226020cc3cc2e223eb43801fa78360d006c26d7140c3b37719faf9e9df34f7R1362-R1377))
L2ncE
pushed a commit
to L2ncE/taichi
that referenced
this issue
Jun 20, 2023
…aichi-dev#8197) Issue: fix taichi-dev#8042 taichi-dev#8114 ### Brief Summary <!-- copilot:summary --> ### <samp>🤖 Generated by Copilot at da679b9</samp> Add support for Python matrices and functions in Taichi kernels. Update `get_var_by_name` to handle `Matrix` objects and add a new test case in `test_matrix.py`. ### Walkthrough <!-- copilot:walkthrough --> ### <samp>🤖 Generated by Copilot at da679b9</samp> * Enable using Python matrices and functions in Taichi kernels by: - Converting `Matrix` objects to `ti.Matrix` objects in `get_var_by_name` ([link](https://github.com/taichi-dev/taichi/pull/8197/files?diff=unified&w=0#diff-3c4fc72604c650382997de2541e648ef88ee8f608a9e3d3ebbe7e6a74cb2eec8L258-R263)) - Adding a new test case for the matrix and function feature in `test_matrix.py` ([link](https://github.com/taichi-dev/taichi/pull/8197/files?diff=unified&w=0#diff-28226020cc3cc2e223eb43801fa78360d006c26d7140c3b37719faf9e9df34f7R6), [link](https://github.com/taichi-dev/taichi/pull/8197/files?diff=unified&w=0#diff-28226020cc3cc2e223eb43801fa78360d006c26d7140c3b37719faf9e9df34f7R1362-R1377))
PGZXB
pushed a commit
to PGZXB/taichi
that referenced
this issue
Jul 13, 2023
…aichi-dev#8197) Issue: fix taichi-dev#8042 taichi-dev#8114 ### Brief Summary <!-- copilot:summary --> ### <samp>🤖 Generated by Copilot at da679b9</samp> Add support for Python matrices and functions in Taichi kernels. Update `get_var_by_name` to handle `Matrix` objects and add a new test case in `test_matrix.py`. ### Walkthrough <!-- copilot:walkthrough --> ### <samp>🤖 Generated by Copilot at da679b9</samp> * Enable using Python matrices and functions in Taichi kernels by: - Converting `Matrix` objects to `ti.Matrix` objects in `get_var_by_name` ([link](https://github.com/taichi-dev/taichi/pull/8197/files?diff=unified&w=0#diff-3c4fc72604c650382997de2541e648ef88ee8f608a9e3d3ebbe7e6a74cb2eec8L258-R263)) - Adding a new test case for the matrix and function feature in `test_matrix.py` ([link](https://github.com/taichi-dev/taichi/pull/8197/files?diff=unified&w=0#diff-28226020cc3cc2e223eb43801fa78360d006c26d7140c3b37719faf9e9df34f7R6), [link](https://github.com/taichi-dev/taichi/pull/8197/files?diff=unified&w=0#diff-28226020cc3cc2e223eb43801fa78360d006c26d7140c3b37719faf9e9df34f7R1362-R1377))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To reproduce:
It reports error
The text was updated successfully, but these errors were encountered: