Code runs with no errors ... but received a 66/100 at submission

I have been trying to submit my assignment and gettting similar error.
I tried the Restart and Save and Run All steps you’ve mentioned above.
Below are the errors:

Code Cell UNQ_C1: Function ‘triplet_loss’ is correct.
Code Cell UNQ_C2: Unexpected error (TypeError(“ufunc ‘isfinite’ not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ‘‘safe’’”)) occurred during function check. We expected function verify to return verify test 1 failed. Please check that this function is defined properly.
Code Cell UNQ_C3: Function ‘who_is_it’ is correct.
If you see many functions being marked as incorrect, try to trace back your steps & identify if there is an incorrect function that is being used in other steps.
This dependency may be the cause of the errors.

I see that it flags something called ‘isfinite’ in the verify function probably.
Do you see anything wrong with my code?
All tests are passing.