public static function fill($value, int $n) : self
    {
        if (!is_int($value) and !is_float($value)) {
            throw new InvalidArgumentException('Fill value expects an'
                . ' integer or float, ' . gettype($value) . ' found.');
        }

        if ($n < 1) {
            throw new InvalidArgumentException('The number of elements'
                . " must be greater than 0, $n given.");
        }

        return static::quick(array_fill(0, $n, $value));
    }
public static function fill($value, int $n) : self
    {
        if (!is_int($value) and !is_float($value)) {
            throw new InvalidArgumentException('Fill value expects an'
                . ' integer or float, ' . gettype($value) . ' found.');
        }

        if ($n < 1) {
            throw new InvalidArgumentException('The number of elements'
                . " must be greater than 0, $n given.");
        }

        return static::quick(array_fill(0, $n, $value));
    }
public static function fill ( $ value , int $ n ) : self { if ( ! is_int ( $ value ) and ! is_float ( $ value ) ) { throw new InvalidArgumentException ( 'Fill value expects an' . ' integer or float, ' . gettype ( $ value ) . ' found.' ) ; } if ( $ n < 1 ) { throw new InvalidArgumentException ( 'The number of elements' . " must be greater than 0, $n given." ) ; } return static :: quick ( array_fill ( 0 , $ n , $ value ) ) ; }
Fill a vector with a given value.

@param mixed $value
@throws \InvalidArgumentException
@return self
Fill a vector with a given value .