How do you reshape a NumPy array, and what constraints apply, such as the total number of elements?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks how to reshape a NumPy array, what happens to the data and its metadata during a reshape, and which constraints the new shape must meet. Tests understanding of element counts, inferring a dimension with -1, views versus copies, and row-major versus column-major order.