Broadcasting is the rule set NumPy uses to carry out arithmetic between arrays whose shapes are not identical but are compatible. Instead of forcing you to tile or copy data so that both operands have the same shape, NumPy conceptually stretches the smaller array along the dimensions where it has length 1 or where a dimension is missing. The result is code that looks like simple algebra — adding a scalar offset to a sensor array, subtracting a row of column means from a data matrix, or building a 2D grid from two 1D vectors — while running at compiled speed with no extra memory for the stretched copies.
In this course, broadcasting is what makes vectorized engineering computation practical. Once you can combine a (100, 3) array of measurements with a (3,) array of calibration constants, or a column vector of times with a row vector of frequencies, you stop writing nested Python loops and start writing expressions that mirror the equations in your textbook. Broadcasting is also the most common source of confusing bugs for new NumPy users, because a shape mismatch either raises an error or, worse, silently produces an array of the wrong shape.
As you watch, keep three things in the front of your mind. First, the actual rule: compare shapes from the trailing (rightmost) dimension backward, and dimensions are compatible only if they are equal or one of them is 1. Second, the role of reshaping tools such as reshape, np.newaxis, and None in deliberately creating a length-1 axis so that an operation broadcasts the way you intend. Third, how to read a ValueError about operands that could not be broadcast together, and how to use .shape to diagnose it before you run anything else.
A focused walkthrough of how NumPy adds and combines arrays of different shapes, from the mCoding channel. Based on its title and description, it explains the broadcasting mechanism itself — how shapes are compared and aligned — and works through concrete code examples rather than treating broadcasting as a side note. Source code is provided by the producer so you can run the same examples yourself.
mCoding is a well-regarded Python channel known for precise, technically careful explanations, and this is a full-length video devoted entirely to broadcasting, which makes it the best fit for the 'What Is Broadcasting?' and 'Broadcasting Rules' subtopics.
A lecture segment from Sebastian Raschka's deep learning course that places broadcasting in the context of vectors, matrices, and linear algebra operations in NumPy and PyTorch. Expect coverage of array dimensionality and shape, how computational libraries extend standard linear algebra conventions, and where broadcasting fits into matrix and vector arithmetic.
Raschka is a university instructor and author, and the linear-algebra framing connects broadcasting to the vector and matrix patterns engineers actually use, supporting the 'Common Broadcasting Patterns in Engineering' subtopic.
A short tutorial that covers NumPy indexing, slicing, and broadcasting together in under seven minutes. It is a compact, hands-on demonstration showing how elements and subarrays are selected and then how arrays of differing shapes are combined in arithmetic expressions.
Its brevity makes it a useful review or quick refresher, and pairing broadcasting with indexing and slicing reinforces the connection between selecting array subsets and operating on them — a link you will need when debugging shape mismatches.
These three videos together target MO2 directly: the mCoding video establishes what broadcasting is and the shape-compatibility rules that let you combine arrays without explicit Python loops, while Raschka's lecture shows those rules operating on the vectors and matrices typical of engineering and linear-algebra work. The Acadaimy tutorial reinforces MO2 and also touches MO3 by presenting indexing and slicing alongside broadcasting, which helps you recognize how the shape of a selected subarray determines whether a later operation will broadcast correctly. Collectively they give you both the rule you can apply mechanically and the shape-reasoning habits needed to avoid broadcasting errors in your own code.
These videos were chosen from YouTube on October 2, 2026. Each has captions; the player turns them on. Videos on YouTube can be changed or removed — if one no longer plays, tell your instructor. If a player does not appear, use its Watch on YouTube link.