Data Loading & Saving: NumPy provides .npy, .txt, and .csv formats.
Indexing & Selection: Access elements using indexing, slicing, and logical selection.
Broadcasting: Allows operations between arrays of different shapes efficiently.
2. Introduction to NumPy
• NumPy (Numerical Python) is a library for
numerical computing in Python. It provides
support for multi-dimensional arrays and
mathematical functions.
3. Creating NumPy Arrays
• - From Python Lists: np.array([1, 2, 3])
• - From Built-in Methods: np.zeros(), np.ones(),
np.arange(), np.linspace()
• - From Random Module: np.random.rand(),
np.random.randint()
8. Broadcasting in NumPy
• - Perform operations on arrays of different
shapes without manual resizing
• - Example: arr + 5, arr1 + arr2 (with different
shapes)