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

error with the operator "-" in code #30

Closed
nuclearWinters opened this issue May 29, 2018 · 6 comments
Closed

error with the operator "-" in code #30

nuclearWinters opened this issue May 29, 2018 · 6 comments

Comments

@nuclearWinters
Copy link

TypeError: numpy boolean subtract, the - operator, is deprecated, use the bitwise_xor, the ^ operator, or the logical_xor function instead.

class ContainedFilter(Filter):
"""desirable segments are not contained by any other"""

def _good_segments(self, segments):
    m = contained_segments_matrix(segments)
    return (True - numpy.max(m, axis=1))

Should I install something or i need to change it manually?

@nuclearWinters
Copy link
Author

srry I just ran it on the command promp and worked

@mit456
Copy link

mit456 commented Jun 12, 2018

Hello,

I am getting the same error what do you mean by running on command prompt? I ran python3 example_grounding.py from my command line and it is failing?

@RedFantom
Copy link
Contributor

@mit456 This is the same issue as #29 . Numpy has deprecated the - operator for arrays. @goncalopp did post he cherry-picked the fix, but I can't find it on any pushed branches. You can use a numpy version of 1.13.0 or earlier (if I'm not mistaken), or you could cherry-pick the changes from my fork of the repository from the numpy branch.

@goncalopp
Copy link
Owner

@RedFantom
Thanks!
You're absolutely right, the commit isn't there, apparently I cherry picked it back to master on 09/03, but forgot to push to github - I've fixed that now :)

@mit456
Can you please try the most recent version in the master branch and see if the problem goes away?

@mit456
Copy link

mit456 commented Jun 14, 2018

@goncalopp It works with the latest master, I tested it.

@goncalopp
Copy link
Owner

@mit456 Great, thanks!

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

No branches or pull requests

4 participants