Understand memory sharing, arr.base, and when modifying a view alters original data.
A **view** shares the exact same memory buffer as the original array (zero-copy). A **copy** allocates a completely independent new memory buffer in RAM.
A **View** is looking at your friend's document through a magnifying glass (if your friend edits it, you see the change). A **Copy** is photocopying the document so you can scribble on your own copy without altering the original.
If `arr.base is None`, the array owns its memory buffer. If `arr.base` points to another array, it is a zero-copy view.
is_view = arr_slice.base is not Noneb = a; b[0] = 99 # Both 'a' and 'b' refer to the exact same variable!b = a.copy(); b[0] = 99`b = a` creates an alias variable name, not a copy. Modifying `b` will modify `a`.
Solve the objective below using NumPy vectorized syntax
Create `a = np.array([1, 2, 3])`, create an independent copy `b = a.copy()`, set `b[0] = 99`, and print `a`.
[1 2 3]