A slice B = A[2:6] is a view: a new (offset, shape, strides) label pointing at the same memory block as A, so writing B[0] = 99 changes A[2] at the same time. B = A[2:6].copy() instead allocates a new independent block, so writing B[0] = 99 leaves A untouched. A view is a different label on one line of numbers; a copy is a new line.

A view shares the memory

A slice is not new numbers. A[2:6] is just a new label — an offset, a shape, a stride — pointing at the same line of memory. Write through it and you write the original.

how is B defined?

memory — one flat line: A