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
File "test.py", line 17, in <module>
y = Y(x)
File "/Users/dunfanlu/Code/Taichi/taichi/python/taichi/lang/struct.py", line 677, in __call__
d[name] = dtype(args[index])
File "/Users/dunfanlu/Code/Taichi/taichi/python/taichi/lang/struct.py", line 687, in __call__
struct = self.cast(entries)
File "/Users/dunfanlu/Code/Taichi/taichi/python/taichi/lang/struct.py", line 717, in cast
entries[k] = int(
TypeError: int() argument must be a string, a bytes-like object or a number, not 'Struct'
But if the final line y = Y(x) is replaced with y = Y(x=x), then it works.
The text was updated successfully, but these errors were encountered:
Consider this code snippet
it fails with
But if the final line
y = Y(x)
is replaced withy = Y(x=x)
, then it works.The text was updated successfully, but these errors were encountered: