slice 3d array in python code example Example 1: numpy 2d slicing print(a2[:, 1]) # [2, 5, 8] Example 2: numpy how to slice individual columns X = data[:, [1, 9]]