Added the number of dimensions as an input parameter to the GP coonstructor