Check out example codes for "how to count positive elements numpy". It will help you in understanding the concepts better.

Code Example 1

>>> np.sum(np.array(x) > 0, axis=0)
array([3, 3, 3, 3, 3, 0])

Learn ReactJs, React Native from akashmittal.com