Question about how to reset gravity

hello,yuanming
I have some problems. I want to try to change the gravity on the grid node, so I add the following code (red box). However, the program cannot be compiled. It seems that the self.set-gravity function cannot pass variables but only constants. What should I do in this situation? Thank you for helping me with this puzzle.
the following figure shows the code that Cannot be compiled (with variable)
image
The error report is as follows
Python returned the following error: <class ‘TypeError’>
write_float(): incompatible function arguments. The following argument types are supported:
1. (self: taichi_core.SNode, arg0: List[int], arg1: float) -> None

Invoked with: <taichi_core.SNode object at 0x0000021962922FB8>, (0, 0, 0, 0, 0, 0, 0, 0), <taichi.lang.expr.Expr object at 0x0000021CA486C518>

Call Stack information:
File “C:\Users\xinjian\Desktop\New folder\LABVIEW function\MPM\MPM3D\MPM3D.py”, line 21, in Getdata
mpm.step(8e-3)
File “C:\Users\xinjian\Desktop\New folder\LABVIEW function\MPM\MPM3D\mpm_solver.py”, line 202, in step
self.grid_op(dt)
File “C:\Users\xinjian\AppData\Roaming\Python\Python36\site-packages\taichi\lang\kernel.py”, line 386, in decorated
primal(*args, **kwargs)
File “C:\Users\xinjian\AppData\Roaming\Python\Python36\site-packages\taichi\lang\kernel.py”, line 341, in call
self.materialize(key=key, args=args, arg_features=self.mapper.extract(args))
File “C:\Users\xinjian\AppData\Roaming\Python\Python36\site-packages\taichi\lang\kernel.py”, line 247, in materialize
taichi_kernel = taichi_kernel.define(taichi_ast_generator)
File “C:\Users\xinjian\AppData\Roaming\Python\Python36\site-packages\taichi\lang\kernel.py”, line 244, in taichi_ast_generator
compiled()
File “C:\Users\xinjian\Desktop\New folder\LABVIEW function\MPM\MPM3D\mpm_solver.py”, line 158, in grid_op
self.set_gravity((G[0],G[1],G[2]))
File “C:\Users\xinjian\Desktop\New folder\LABVIEW function\MPM\MPM3D\mpm_solver.py”, line 87, in set_gravity
self.gravity[None] = g
File “C:\Users\xinjian\AppData\Roaming\Python\Python36\site-packages\taichi\lang\matrix.py”, line 282, in setitem
self(i, j)[index] = item[i][j]
File “C:\Users\xinjian\AppData\Roaming\Python\Python36\site-packages\taichi\lang\expr.py”, line 194, in setitem
self.setter(value, *key)
File “C:\Users\xinjian\AppData\Roaming\Python\Python36\site-packages\taichi\lang\expr.py”, line 171, in setter
snode.write_float(key, value)

TypeError: write_float(): incompatible fu

However, the following figure shows the code that can be compiled (but only constant)
image

This seems to be a bug of @ti.func, recently get fixed in https://github.com/taichi-dev/taichi/pull/539, please upgrade to the latest version, and I believe the problem is solved.