NumPy array - Outer product of vectors | Python

The outer product of NumPy vectors can be calculated by outer.

import numpy

a = numpy.array([1, 2])
b = numpy.array([3, 4])

c = numpy.outer(a, b)

print(c)
# [[3 4]
#  [6 8]]

print(type(c))  # <class 'numpy.ndarray'>

NumPy Vector

NumPy Tutorial