public static function stack(array $vectors) : self
    {
        $a = [];

        foreach ($vectors as $vector) {
            if (!$vector instanceof Vector) {
                throw new InvalidArgumentException('Cannot stack a non'
                    . ' vector, ' . gettype($vector) . ' found.');
            }

            $a[] = $vector->asArray();
        }

        return self::quick($a);
    }
public static function stack(array $vectors) : self
    {
        $a = [];

        foreach ($vectors as $vector) {
            if (!$vector instanceof Vector) {
                throw new InvalidArgumentException('Cannot stack a non'
                    . ' vector, ' . gettype($vector) . ' found.');
            }

            $a[] = $vector->asArray();
        }

        return self::quick($a);
    }
public static function stack ( array $ vectors ) : self { $ a = [ ] ; foreach ( $ vectors as $ vector ) { if ( ! $ vector instanceof Vector ) { throw new InvalidArgumentException ( 'Cannot stack a non' . ' vector, ' . gettype ( $ vector ) . ' found.' ) ; } $ a [ ] = $ vector -> asArray ( ) ; } return self :: quick ( $ a ) ; }
Build a matrix by stacking an array of vectors.

@param \Rubix\Tensor\Vector[] $vectors
@throws \InvalidArgumentException
@return self
Build a matrix by stacking an array of vectors .