def find_indices(condition):
 (res,) = np.nonzero(np.ravel(condition))
 return res

def find_indices ( condition ) : ( res , ) = np . nonzero ( np . ravel ( condition ) ) return res
return the indices where ravel is true .