Skip to content

Conversation

@mdisterhof
Copy link

Previous code caused TypeError:

Screenshot_20210513_185427

Also comparator was inverted so that mapping is (-1 -> 0) and (1 -> 1) instead of (-1 -> 1) and (1 -> 0). Not sure if that was a deliberate decision..

Previous code caused Error:
'''
TypeError                                 Traceback (most recent call last)
<ipython-input-15-d67443cc025b> in <module>
      1 a = [-1,1,1,-1]
      2 
----> 3 (a < 0).astype(int)

TypeError: '<' not supported between instances of 'list' and 'int'
'''

Also comparator changed so that mapping is (-1 -> 0) and (1 -> 1) instead of (-1 -> 1) and (1 -> 0).
@mdisterhof
Copy link
Author

I only tested this line in a notebook and not from within the package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant