Can I ask how to achieve this in Python:
Input:
I = [10,-22,0]
Output:
O = [1,-1,-1]
I was thinking
O=I/abs(I)
But how to deal with zero?
Can I ask how to achieve this in Python:
Input:
I = [10,-22,0]
Output:
O = [1,-1,-1]
I was thinking
O=I/abs(I)
But how to deal with zero?