Classification List Comprehension Not Behaving as Expected
-1 if x < .1 else 0 should be -1 if x < -.1 else 0
I have built a list comprehension that takes in a list of lists [actual, predicted] and then classifies the contained lists. I want to produce output lists that have 1 if the original element is > .1, -1 if the original output is < -.1 and 0 if the original element is < .1 and > -.1. For example [[2, 0, -2],[0, 0, 0]] would be mapped to [[1,0,-1], [0,0,0]]. 
I am using this code to perform this:
classified = [list(map(lambda x: 1 if x > .1 else (-1 if x < .1 else 0), i)) for i in inputs].
However, when my code should classify an element as 0, it classifies it as -1. For example [-.15, -.05, 0] is mapped to [-1, -1, -1] instead of [-1, 0, 0]. It does classify points that map to 1 and -1 correctly.