Closed cmacdonald closed 5 years ago
I agree. Feel free to send a PR to fix this.
PR sent a few days ago. Good to go?
Sorry for the delayed response. PR merged!
Just leaving this comment here in case this helps anyone else. I got this error while using evaluator.evaluate()
. The reason I got the error was because one of my variable was of the type np.float32
whereas I am assuming the builder expects it be of type float
. Changing type to float resolved the error.
This works
evaluator.evaluate({'151': {'clueweb09-en0027-05-20087': float(10000)}})
This does not: evaluator.evaluate({'151': {'clueweb09-en0027-05-20087': 10000}})There's no valid reason why a matching score cannot be an int, so I think the check at https://github.com/cvangysel/pytrec_eval/blob/6440d7e07ef18443a7423e531368091aac474eb5/src/pytrec_eval.cpp#L270 is too strict.
The error message is not too clear: `
TypeError Traceback (most recent call last)