numpy.unravel_index理解

np.unravel_index 参考: http://blog.csdn.net/dn_mug/article/details/70256109 https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.unravel_index.html numpy.unravel_index(indices, dims, order='C') >>> np.unravel_index([22, 41, 37], (7,6)) (array([3, 6, 6]), array([4, 5, 1])) >>> np.unravel_index([31, 41, 13], (7,6), order='F') (array([3, 6, 6]), array([4, 5, 1])) >>> np.unravel_index(1621, (6,7,8,9)) (3, 1, 4, 1) 功能: 假设将数组flatten,那么flattened的数组的索引为indices(可以是多个 […]