NumPy - Array OperationsWhy does numpy perform element-wise arithmetic by default instead of matrix operations?ABoth C and DBBecause numpy arrays are always 1D vectors.CBecause matrix operations require special functions like np.dot or np.matmul.DBecause element-wise operations are simpler and more intuitive for arrays.Check Answer
Step-by-Step SolutionSolution:Step 1: Understand default numpy behaviorNumpy arrays default to element-wise operations for simplicity and clarity.Step 2: Recognize matrix operations need special functionsMatrix multiplication requires np.dot or np.matmul, not operators like *.Final Answer:Both C and D -> Option AQuick Check:Element-wise default + matrix needs special funcs = Both C and D [OK]Quick Trick: Element-wise is default; matrix multiply needs np.dot or np.matmul [OK]Common Mistakes:Thinking * does matrix multiplyAssuming arrays are always 1DIgnoring special matrix functions
Master "Array Operations" in NumPy9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More NumPy Quizzes Aggregation Functions - np.std() and np.var() for spread - Quiz 2easy Array Data Types - Specifying dtype during creation - Quiz 2easy Array Data Types - Specifying dtype during creation - Quiz 4medium Array Manipulation - np.split() for dividing arrays - Quiz 1easy Array Operations - Scalar operations on arrays - Quiz 9hard Broadcasting - Broadcasting compatibility check - Quiz 3easy Broadcasting - Why broadcasting matters - Quiz 15hard Creating Arrays - Why array creation matters - Quiz 1easy NumPy Fundamentals - Array attributes (shape, dtype, ndim, size) - Quiz 1easy NumPy Fundamentals - NumPy array vs Python list performance - Quiz 3easy