直接分析就知道了
import numpy as np
a = np.array([[[1,2,3],[4,5,6]]])
print(a)
print(a.shape)
target_region = np.expand_dims(a, 0)
print(target_region)
print(target_region.shape)
target_region = np.expand_dims(a, 1)
print(target_region)
print(target_region.shape)
target_region = np.expand_dims(a, 2)
print(target_region)
print(target_region.shape)
target_region = np.expand_dims(a, 3)
print(target_region)
print(target_region.shape)
target_region = np.expand_dims(a, 6)
print(target_region)
print(target_region.shape)