[docs]defmandebrot_taichi(c:Any)->Any:""" Taichi implementation of the Mandelbrot set. Since Taichi does not support complex numbers directly, internally the input is stacked as a +1D array with real and imaginary parts. Taichi's from_numpy() and to_numpy() are !!NOT!! zero-copy, so we pass non-Taichi arrays directly to the kernel. (See "Note" in https://docs.taichi-lang.org/docs/external) See Also -------- https://docs.taichi-lang.org/docs/external """xp=array_namespace(c)out=xp.empty(c.shape,dtype=xp.int32,device=c.device)c=xp.stack([c.real,c.imag],axis=-1)_mandelbrot_kernel(c,out)returnout