What is the difference between np.zeros, np.ones, and np.empty, and why is np.empty faster?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks how np.zeros, np.ones and np.empty differ when creating a NumPy array and why np.empty is usually the fastest. Tests your understanding of array initialization, memory allocation costs, and when it is safe to work with uninitialized memory.