Explain the importance of choosing the correct dtype and how type promotion and casting rules work in NumPy
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks why the choice of dtype matters in NumPy and how type promotion and casting rules decide the dtype of mixed operations. Tests your grasp of overflow, precision and memory trade-offs, the casting levels and their defaults, and the scalar promotion rules in NumPy 2.0.