NumPy: Arrays, Data Types & Creation NumPy is the foundation of the Python scientific computing ecosystem. Its ndarray stores homogeneous data in a contiguous memory block — operations are implemented in C and 10–100× fa…
ReadNumPy: Indexing, Slicing & Broadcasting Basic Indexing & Slicing a = np.array([[1, 2, 3, 4], [5, 6, 7, 8], [9,10,11,12]]) # Element access a[0, 1] # 2 (row 0, col 1) a[-1, -1] # 12 (last row, last col) # Slicing: [start:…
ReadNumPy: Math, Linear Algebra & Performance Universal Functions (ufuncs) a = np.array([1.0, 4.0, 9.0, 16.0]) # Element-wise math (vectorized — no Python loop needed) np.sqrt(a) # [1. 2. 3. 4.] np.square(a) # [1. 16. 81. 25…
ReadSave this stack to your personal DevRecall — add your own notes, track what you're learning, and share what you know with the community.
Get started — free forever