It probably makes sense to pass an Array, so we can check that the array is length ndim.