As stated in the docs for numpy.all(): numpy.all() tests whether all array elements along a given axis evaluate to True. Is there a function, that does the opposite: Check whether all array elements along a given axis (I need the diagonal) evaluates to False. What I need in particular is to check if the diagonal of a 2-dimensional matrix is zero every where. Continue reading...