if (FALSE) {
# R base operation
atan2(0, 1)
atan2(1, 0)
# LazyTensor symbolic element-wise 2-argument arc-tangent
x <- matrix(runif(150 * 3), 150, 3) # arbitrary R matrix, 150 rows, 3 columns
y <- matrix(runif(250 * 3), 250, 3) # arbitrary R matrix, 250 rows, 3 columns
x_i <- LazyTensor(x, index = 'i') # creating LazyTensor from matrix x,
# indexed by 'i'
y_j <- LazyTensor(y, index = 'j') # creating LazyTensor from matrix y,
# indexed by 'j'
Atan2_xy <- atan2(x_i, y_j) # symbolic matrix
}
Run the code above in your browser using DataLab