You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I was trying to convert a Taichi Vector to be saved. However, this gives an error saying `AttributeError: module 'taichi.lang.matrix_ops' has no attribute 'to_numpy'
My code is as the following
to_numpy can only be used in fields (ti.Vector.field) or ndarray, while ti.Vector.zero is a temporary variable and can hardly be converted into numpy arrays. Maybe you can try to save results into a field and then use to_numpy in python scope (i.e. out of ti.kernel).
Thank you for your help! Using it for fields worked. The documentation for this is a little bit confusing since this looks like it works for Vector/Matrix. Would suggest adding something saying it only works for fields or ndarray.
Hi, I was trying to convert a Taichi Vector to be saved. However, this gives an error saying `AttributeError: module 'taichi.lang.matrix_ops' has no attribute 'to_numpy'
My code is as the following
I also tried to add to_numpy in other places, but none of them worked
The taichi version I'm using is 1.5.0. Any help is appreciated.
The text was updated successfully, but these errors were encountered: