title: Testing the number of consecutive values in Numpy Array
body: <p>How could I write a code that calculates how many consecutive times there was a positive , negative and zero values within the <code>a</code> array. How would I be able to compute this?</p>
  <pre><code>import numpy as np
  a = np.array([  0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.    0.
     0.    0.    0.    0.    0.    0.    0.    0.    0.   -8.    0.    0.
   304.2 -27.8 -15.4   0.    0.  -14.8   0.    6.4  14.4   0.  -10.6  55.8
    23.1   0.   27.9  34.7  62.   23.   41.6  30.7  30.5  34.9  40.9  21.7
    31.3  19.9  32.8  26.2  14.8  18.9  15.2  23.8  21.9 112.7  38.4  34.4])
  </code></pre>
  <p>Expected Result</p>
  <pre><code>Consecutive Positive results: 22
  Consecutive Zero results: 21
  Consecutive Negative results: 2
  </code></pre>