Read this lesson as text
Arrays and Shapes in NumPy
Linear Algebra for Machine Learning · Axiom Academy
Worked example: Creating and reshaping arrays You have a 1D array of 12 values: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]. Reshape it into a 3×4 matrix and then extract specific elements. Understanding Reshape: What is M[1:3, 0:2]? Shape Compatibility: Can you reshape a (12,) array into (3, 5)?
This is the written version of the interactive lesson above. See the full Linear Algebra for Machine Learning course.