python multidimensional arrays - most efficient way to count number of non-zero entries,sum(1 for row in rows for i in row if i)