# NOT RUN {
x <- matrix(1:6, ncol = 1)
# Reshape with the same dimensionality
rray_reshape(x, c(2, 3))
# Change the dimensionality and the dimensions
rray_reshape(x, c(3, 2, 1))
# You cannot reshape to a total size that is
# different from the current size.
try(rray_reshape(x, c(6, 2)))
# Note that you can broadcast to these dimensions!
rray_broadcast(x, c(6, 2))
# }
Run the code above in your browser using DataLab