🔢 NumPy
Array Operations
Vectorization and Broadcasting are the heart of NumPy performance. This section explores these concepts with textbook definitions and clear examples.
● Intermediate
📖 Based on: NumPy User Guide, Python for Data Analysis — Wes McKinney
📋 Table of Contents
1 · Vectorization & ufuncs
Textbook Definition
"A universal function, or ufunc, is a function that performs element-wise operations on data in ndarrays." — Wes McKinney
2 · Return Values
🔁 Return Value: arithmetic
Arithmetic operations between arrays (or arrays and scalars) return a new ndarray containing the result. The original arrays remain untouched.