Python

import numpy as np
a = np.array([1, 2])
b = np.array([3, 4])
np.outer(a, b)

Output

array([[3, 4],
       [6, 8]])

Julia

a = [1, 2]
b = [3, 4]
a * b'

Output

2×2 Matrix{Int64}:
 3  4
 6  8