Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fundamental.py #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

markdisterhof
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).
@markdisterhof
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant