Q:

numpy count where

>>> np.sum(np.array(x) > 0, axis=0)
array([3, 3, 3, 3, 3, 0])
1
print(np.sum(a % 2 == 1))
1

New to Communities?

Join the community