title: How to return 1 or -1 if number is positive or negative (including 0)?
body: <p>Can I ask how to achieve this in Python:</p>
  
  <p>Input:
  <code>I = [10,-22,0]</code></p>
  
  <p>Output:
  <code>O = [1,-1,-1]</code></p>
  
  <p>I was thinking
  <code>O=I/abs(I)</code></p>
  
  <p>But how to deal with zero?</p>