Slice — fix one index, keep the rest. Spanish: corte.
photo[:, :, 0].shape # (512, 512) — one colour channel, still an image
Fixing one index of a (512, 512, 3) photo drops that axis and leaves an order-2 image behind.
(512, 512, 3)