how to copy taichi variables in python scope

how to copy taichi variables like ti.Vector or ti.Matrix in python scope

a = ti.Vector([0,0,0])         # the actual shape of /a/ is 27*3, I want to initialize it in python scope
b = a                          # in order to simplified coding, i am wondering how to copy the value of /a/ to /b/,  
                               # similar to b=numpy.copy(a) 

Hi Otis,
you can make use of python’s copy library, for example:

import copy
a = ti.Vector([0, 0, 0])
b = copy.copy(a)

That should make a deep copy of Vector a