I think I\'m missing something obvious. Consider the following code:
import numpy as np a = np.array([[ 0, 2, 0, 5, 4, 6, 2, 4], [ 3,