Explain the difference between np.copy() and np.asarray() when converting data types or creating arrays.
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Compare np.copy() and np.asarray() in NumPy: when each one allocates a new buffer, when the result shares memory with the input, and how dtype conversion fits in. Tests understanding of copies, views and safe array handling at function boundaries.