Skip to main content
4 of 7
Copy edited (e.g. ref. <http://en.wikipedia.org/wiki/NumPy> and <http://en.wikipedia.org/wiki/Python_%28programming_language%29>).

Mathematica equivalent of NumPy broadcast addition for large arrays

What is the Mathematica equivalent of the following Python code with the vectors' broadcast addition?

import numpy as np

a = np.random.rand(5000, 1, 5);
b = np.random.rand(1, 500, 5);

result = a + b