If I have a numpy.ndarray defined as follows:
Is there a function to return all the valid INDEX values for that array? I would hope to see a set of values like the following:
Peter
1 2 |
import numpy as np x = np.ndarray([ 2 , 2 , 2 ], order = 'C' , dtype = '<U3' ) |
Output:[[0,0,0], [0,0,1], [0,1,0], [0,1,1], [1,0,0], [1,0,1], [1,1,0], [1,1,1]]
Is that possible?Peter