Element-wise addition, subtraction, multiplication, division, power, and floor division.
All standard arithmetic operators (`+`, `-`, `*`, `/`, `//`, `%`, `**`) operate element-wise in NumPy at compiled C-speed using SIMD vector registers.
Unlike Python lists where `list * 2` duplicates the list, in NumPy `arr * 2` multiplies every single number inside by 2 simultaneously.
Operations between arrays of the same shape apply to matching index positions in parallel.
res = a + ba = [1, 2, 3]; b = [4, 5, 6]; c = a + b # Python list concatenation [1,2,3,4,5,6]a = np.array([1, 2, 3]); b = np.array([4, 5, 6]); c = a + b # NumPy [5, 7, 9]Standard Python `+` concatenates lists; NumPy `+` computes numerical element-wise addition.
Solve the objective below using NumPy vectorized syntax
Create `arr = np.array([2, 4, 6, 8])`, multiply by 5 using `arr * 5`, and print.
[10 20 30 40]