给定一个mxmxm的多维数据集,我需要知道6个面上的行,它们中的行的最小值大于给定的n。
获得各种面孔:
faces = np.array([
x[ 0, :, :],
x[-1, :, :],
x[ :, 0, :],
x[ :, -1, :],
x[ :, :, 0],
x[ :, :, -1],
])
现在只需循环:
# No information on axis provided by OP so always pick axis=2
row_mins = np.min(faces, axis=2)
print(faces[row_mins > n])