Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

how to count positive elements numpy

>>> np.sum(np.array(x) > 0, axis=0)
array([3, 3, 3, 3, 3, 0])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #count #positive #elements #numpy
ADD COMMENT
Topic
Name
1+7 =