Pyhton - Numpy array, number of time satisfying a condition : I have a numpy array as follow:

    a = [1 4 2 6 4 4 6 2 7 6 2 8 9 3 6 3 4 4 5 8]

and a constant number `b=6`

I am searching for a number `c` which is defined by the number of occurrence that `a` is more than 2 times consecutively inferior to `b`?

So in this example it `c=3`

 