What does np.unique do, and how do parameters like return_counts and return_index work?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: easy
Interview Round: Other
Overview: Asks what NumPy's np.unique returns and how the return_counts, return_index and return_inverse flags and the axis parameter work. Tests whether you can read the extra arrays correctly and use them for frequency tables, label encoding and order-preserving deduplication.