How do I count the number of 0s and 1s in the following array?
0
1
y = np.array([0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1])
y.count(0) gives:
y.count(0)
numpy.ndarray object has no attribute count
numpy.ndarray
count
← Назад к списку