def first_true4():
    di = {}
for i, ele in enumerate(np.argmax(a, axis=1)):
    if ele == 0 and a[i][0] == 0:
        di[i] = None
else:
    di[i] = ele
return di
Finding first non-zero value along axis of a sorted two dimensional numpy array