N1H1L
Joined 6 years ago
Karma
845
Submissions
439
Member since
Mar 20
I build computing solutions to scientific problems.
View on Hacker NewsJoined 6 years ago
This is a very weird issue to be mad about, and can be extended to multiple technologies - if you think about it, from computers to cellphones.
Also H1B pays FICA taxes, that exemption is only for OPT. The OPT exemption can be easily removed.
from typing import Optional, Union
def square(
a: Union[int, float],
b: Optional[int] = 2
) -> float:
c = a**b
return c
Many type checkers throw an error because `Optional[int]` actually means `int | None` and you cannot square an `int` or a `float` with a `None`. Is there any plans for *ty* around this?Python's type ecosystem's support for proper type checked data science libraries is abysmal (`nptyping` is pretty much the most feature complete, and it too is far from complete), and has tons of weird bugs.
The Array API standard (https://data-apis.org/array-api/latest/purpose_and_scope.htm...) is a step in the right direction, but until that work is close to some sort of beta version, data science folks will have tons of type errors in their code, in spite of trying their best.