In [1]:
import numpy as np
In [2]:
a_1d = np.arange(10)
print(a_1d)
In [3]:
print(a_1d[3])
In [4]:
a_2d = np.arange(12).reshape(3, 4)
print(a_2d)
In [5]:
print(a_2d[0, 2])
In [6]:
a_3d = np.arange(24).reshape(2, 3, 4)
print(a_3d)
In [7]:
print(a_3d[0, 1, 2])
In [8]:
print(a_3d[1, [True, False, True], ::2])