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

bug: old version numpy.float type deprecated for numpy >= 1.24 #27

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

Conversation

KennyNg-19
Copy link

@KennyNg-19 KennyNg-19 commented Nov 20, 2023

Context

  • Issues: Moverscore demo code fails to run because numpy.float64 or numpy.float32 types are deprecated for the mainstream numpy version >= 1.24. The error is as below for any numpy version >= 1.24.

  • Code to run

refs = ['The dog bit the man.', 'The dog had bit the man.']
sys = 'The dog bit the man.'
mover = sentence_score(sys, refs)
print(mover)
  • Exception raised:
    image

Changes

Fixes: I replaced all occurrences with python float type as suggested in this answer and tested it with Moverscore -- it works. The numpy new version >= 1.24 should have compatibility for other functions in the older version.

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