Using precondition, rather than optional, to enforce vector dimensions
Using [Double] instead of Array<Double>