numpy slice 3 dimensional array code example Example 1: numpy 2d slicing print(a2[:, 1]) # [2, 5, 8] Example 2: python code to slice it as abstract within borders print("hello")