NumPy has the efficient function/method nonzero() to identify the indices of non-zero elements in an ndarray object. What is the most efficient way to obtain th
ndarray
import numpy as np x = np.array([1,0,2,3,6]) non_zero_arr = np.extract(x>0,x) min_index = np.amin(non_zero_arr) min_value = np.argmin(non_zero_arr)