Closed guidopetri closed 4 years ago
I think that's the first time the CI has passed first time for me! Yay!
Thanks! With hindsight all my uses of asserts would be better as actual exceptions, with informative error messages. Let me know if you want to change this here; otherwise, happy to merge.
I'll switch to an exception then. Any specific kind you want here? Maybe TypeError?
Thanks!
Closes #532 .
This is a small PR that just checks if the input to
LightFM.predict()
is in fact eithernp.ndarray
orint
type. It also includes a line intest_predict()
to make sure this doesn't break later. The docs weren't changed because they already implied that the only acceptable input wasnp.ndarray
orint
.Let me know if you'd rather not use an
AssertionError
there. I used it because a couple lines later there's anotherassert
statement, and I figured you'd want some consistency.