numpy count where

Solutions on MaxInterview for numpy count where by the best coders in the world

showing results for - "numpy count where"
Micaela
04 Jun 2016
1>>> np.sum(np.array(x) > 0, axis=0)
2array([3, 3, 3, 3, 3, 0])
Kessy
03 Jul 2017
1print(np.sum(a % 2 == 1))
similar questions
queries leading to this page
numpy count where