We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
copy_from()
The following code crashes
@ti.dataclass class C: i: int f: float cf1 = C.field(shape = (2,)) cf2 = C.field(shape = (2,)) cf1.copy_from(cf2)
with the error message
TypeError: Cannot copy from a non-field object
Interestingly, if the copy is performed on 2D fields, the crash has a different error message:
@ti.dataclass class C: i: int f: float cf1 = C.field(shape = (2,2)) cf2 = C.field(shape = (2,2)) cf1.copy_from(cf2)
AssertionError: Slicing is not supported on ti.field
The text was updated successfully, but these errors were encountered:
[Bug] Fix copy_from() of StructField (#7294)
a16d5ea
Issue: fix #7290
[Bug] Fix copy_from() of StructField (taichi-dev#7294)
ede3b62
Issue: fix taichi-dev#7290
strongoier
Successfully merging a pull request may close this issue.
The following code crashes
with the error message
Interestingly, if the copy is performed on 2D fields, the crash has a different error message:
The text was updated successfully, but these errors were encountered: