Pseudocode:
if (all elements in c == 0) or (all elements in c == 2):
# all elements in 'c' are either 0 or 2.
. . .
If c = numpy.array[0,0,2] the condition is true,
but if c = numpy.array[0,1,2] it is false.
How to test this condition in Numpy efficiently?