Skip to content

Commit 08dac4c

Browse files
bluevisortaichi-gardener
authored andcommitted
[Misc] explicitly cast indices to int32 in snode_deactivate to prevent TaichiWarning
1 parent 0972859 commit 08dac4c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/taichi/_kernels.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,13 +264,13 @@ def field_fill_python_scope(F: template(), val: template()):
264264
@kernel
265265
def snode_deactivate(b: template()):
266266
for I in grouped(b):
267-
deactivate(b, I)
267+
deactivate(b, [int(i) for i in I])
268268

269269

270270
@kernel
271271
def snode_deactivate_dynamic(b: template()):
272272
for I in grouped(b.parent()):
273-
deactivate(b, I)
273+
deactivate(b, [int(i) for i in I])
274274

275275

276276
@kernel

0 commit comments

Comments
 (0)