Which of these statements about scalar and array broadcasting is TRUE?
easy📝 Conceptual Q2 of 15
NumPy - Broadcasting
Which of these statements about scalar and array broadcasting is TRUE?
ABroadcasting changes the original array shape permanently
BBroadcasting requires arrays to have the same shape
CBroadcasting only works with arrays of equal size
DA scalar can be broadcast to any array shape automatically
Step-by-Step Solution
Solution:
Step 1: Recall broadcasting rules
Scalars can be broadcast to any array shape automatically without changing the array shape.
Step 2: Evaluate options
Only A scalar can be broadcast to any array shape automatically correctly states this; others are false because broadcasting does not require same shape or change original array.
Final Answer:
A scalar can be broadcast to any array shape automatically -> Option D
Quick Check:
Scalar broadcasting = Any shape expansion [OK]
Quick Trick:Scalars broadcast to any array shape automatically [OK]
Common Mistakes:
Assuming arrays must match shapes
Thinking broadcasting alters original array
Confusing size with shape
Master "Broadcasting" in NumPy
9 interactive learning modes - each teaches the same concept differently