find position of last element before specific value in python numpy
<p>I have the foll. python numpy array, arr:</p>

<pre><code>([1L, 1L, 1L, 1L, 1L, 1L, 1L, 0L, 0L, 0L, 0L, 3L, 3L, 3L, 2L, 2L, 2L,
       2L, 2L, 2L, 1L, 1L, 1L, 1L])
</code></pre>

<p>I can find the first occurrence of 1 like this: </p>

<pre><code>np.where(arr.squeeze() == 1)[0]
</code></pre>

<p>How do I find the position of the last 1 before either a 0 or 3.</p>