4 ms·
That not even an error, it's an usability improvement.
by ReflectedImage 4y ago
That not even an error, it's an usability improvement.
- lostmsu 4y agoFirstly, usability bugs like this are still bugs. Secondly, think how that issue surfaced in the first place. Somebody used TensorFlow in their Python code, and their Python code produced unexpected result and/or crashed. Judging by the fix, it is highly unlikely to have produced one of the errors from the above list. As a ML practitioner I can also tell you it likely means somebody had to spend a significant amount of time to get to the cause once they saw the output, because numerical miscalculations are very hard to debug in the first place.
- ReflectedImage 4y agoThat not a bug that static typing would catch as it is not a type bug.
- lostmsu 4y agoWhat do you mean it is not a type bug? You've seen the fix with your own eyes. In the static language that fix would never have been needed, because the consumer would never have made the mistake that caused the miscalculation in the first place. Of course it is a type bug! This is along the lines of def is_valid_email(email): return str(email).contains('@') class Person: ... def __str__(self): return $"{self.name} <{self.email}>" print(is_valid_email(Person(name='Peter @ Work', email=None)))
- ReflectedImage 4y agoYou can't get a NaN from a None value in Python. (Duck typing still has rules) The error you have posted isn't a Python error. Looking a bit deeper, the error occurs in C++ code. C++ is a statically typed language, last time I checked.