You have to reshape the inputs so that one argument lies along the first dimension, the second along the second dimension, and so on. Try
func.(x, y', reshape(z, 1, 1, :))
You have to reshape the inputs so that one argument lies along the first dimension, the second along the second dimension, and so on. Try
func.(x, y', reshape(z, 1, 1, :))