1In [3]: arr
2Out[3]:
3array([[1, 2, 0, 3],
4 [3, 9, 0, 4]])
5
6In [4]: np.count_nonzero(arr==0)
7Out[4]: 2
8
9In [5]:def func_cnt():
10 for arr in arrs:
11 zero_els = np.count_nonzero(arr==0)
12 # here, it counts the frequency of zeroes actually