As stated the solution is to assign the whole [x, y, z] float3 value to the rotation at one time.
override func rotate(delta: float2) {
let sensitivity: Float = 0.005
var x = rotation.x + delta.y * sensitivity
x = max(-Float.pi/2, min((x), Float.pi/2))
let y = rotation.y + delta.x * sensitivity
// Need to assign the whole [x, y, z] float3 value to the rotation at one time
rotation = [x, y, 0]
_viewMatrix = updateViewMatrix()
}