Skip to content

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

Open
KennyNg-19 wants to merge 1 commit intoAIPHES:masterfrom
KennyNg-19:master
Open

bug: old version numpy.float type deprecated for numpy >= 1.24#27
KennyNg-19 wants to merge 1 commit intoAIPHES:masterfrom
KennyNg-19:master

Conversation

@KennyNg-19
Copy link
Copy Markdown

@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