public function createDesignMatrix($xs) : Matrix { if (is_int($xs) || is_float($xs)) { $xs = [$xs]; } $X = new VandermondeMatrix($xs, $this->p + 1); if ($this->fit_constant == 0) { $X = $X->columnExclude(0); } return $X; }