What about using an `elif: ...` statement for the float case, and use the `else: ...` block to capture type errors. Or at least add a TODO comment saying that we should do that later (because we do not perform such a strong type-checking systematically in the rest of sklearn code).