Search snippets
Browse Code Answers
FAQ
Usage docs
Log In
Sign Up
Home
Whatever
numpy count where
Łukasz Urbański
Programming language:
Whatever
2021-06-25 04:42:00
0
Q:
numpy count where
antrep1234
Code:
Whatever
2021-08-16 04:55:12
>>> np.sum(np.array(x) > 0, axis=0) array([3, 3, 3, 3, 3, 0])
1
Veronica LeBlanc
Code:
Whatever
2021-01-17 11:51:21
print(np.sum(a % 2 == 1))
1
Tags
count
Related
numpy count the number of 1s in array
np array value count
df count missing values
New to Communities?
Join the community