I have a numpy array,
> [[ 0 0 0 0 0]
[ 0 0 0 0 0]
[ 0 0 0 0 0]
...
[ 0 255 0 255 0]
[ 0 255 0 0 0]
[ 0 255 0 0 0]]
I would like to check values in each column of this 2d numpy array - whether or not there are more than one column with alternating 0 and 255 values
Example column
> [[ 0 0 0 255 0]
[ 0 255 0 0 0]
[ 0 255 0 0 0]
[ 0 255 0 0 0]
[ 0 0 0 0 0]
[ 0 0 0 0 0]
[ 0 0 0 0 0]
[ 0 0 0 0 0]
[ 0 255 0 0 0]
[ 0 255 0 0 0]
[ 0 255 0 0 0]
[ 0 255 0 0 0]
[ 0 255 0 0 0]]
In the above example, column two has alternating 0 and 255 values, hence, the output should be that this numpy array has one column with these alternating values