if (FALSE) {
# R base operation
Mod(1)
Mod(1+1i)
# LazyTensor symbolic element-wise complex modulus (absolute value)
z <- matrix(1i^ (-6:5), nrow = 4) # complex 4x3 matrix
z_i <- LazyTensor(z, index = 'i', is_complex = TRUE) # ComplexLazyTensor
Mod_z_i <- Mod(z_i) # symbolic matrix
}
Run the code above in your browser using DataLab