How do contiguous memory and a fixed dtype make NumPy fast, and how do you minimize memory copies?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Explain how NumPy's single-dtype, contiguous array layout makes vectorized code fast, and how to avoid unnecessary memory copies. It tests understanding of strides and views, cache behavior, broadcasting, in-place operations and dtype casting.