title: Converting an array to positive indicator
body: <p>Suppose that we have an array like:</p>
  
  <pre><code>[-2,4,3,-1,2]
  </code></pre>
  
  <p>How can we convert this to the positive indicator array in <code>python</code> such that we have</p>
  
  <pre><code>[0,1,1,0,1]
  </code></pre>
  
  <p>I know how to do this in <code>MATLAB</code> but not in the <code>python</code>. </p>