Answer the question
In order to leave comments, you need to log in
What does numpy.sum(img==1) mean in the Python numpy library?
I thought that the default value, but why are there then two = ?
Answer the question
In order to leave comments, you need to log in
Counts the number of elements equal to "1"
>>> a = numpy.array([0,1,1,0,1,1,1,0,0,1])
>>> numpy.sum(a==1)
6
>>> numpy.sum(a==0)
4
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question