SyntaxFix
Write A Post
Hire A Developer
Questions
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)