Use unravel_index
:
numpy.unravel_index(A.argmin(), A.shape)
More Related Contents:
- Is there a NumPy function to return the first index of something in an array?
- Understanding NumPy’s einsum
- Intuition and idea behind reshaping 4D array to 2D array in NumPy
- Is there any numpy group by function?
- Computing the correlation coefficient between two multi-dimensional arrays
- Removing nan values from an array
- Why is numpy’s einsum faster than numpy’s built in functions?
- How to return 0 with divide by zero
- Reshape an array in NumPy
- How do I access the ith column of a NumPy multidimensional array?
- Interweaving two numpy arrays
- How can I check if one two-dimensional NumPy array contains a specific pattern of values inside it?
- Most efficient way to forward-fill NaN values in numpy array
- NumPy array initialization (fill with identical values)
- Numpy – add row to array
- Why does numpy.zeros takes up little space
- Generalise slicing operation in a NumPy array
- Selecting Random Windows from Multidimensional Numpy Array Rows
- How to split a numpy array in fixed size chunks with and without overlap?
- Parameters to numpy’s fromfunction
- List to array conversion to use ravel() function
- Initialise numpy array of unknown length
- Efficient distance calculation between N points and a reference in numpy/scipy
- Fastest save and load options for a numpy array
- NumPy array/matrix of mixed types
- Numpy find indices of groups with same value
- Cannot understand numpy argpartition output
- Python: Split NumPy array based on values in the array
- Efficient dot products of large memory-mapped arrays
- numpy array row major and column major