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.
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)))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.
It also says that a software feature only needs 1/2.5 lines if you are using dynamic typing.
That means dynamic typing reduces bugs by 2.5x compared to static typing per software feature.
Take a look at the "Programming effort" graph and the "Program length" graph.
This claim is not supported by the linked article.
In fact, the main claim (only 2% of bugs are type errors) of the linked article also does not make any sense. It is based on the assumption, that typing errors only ever cause TypeError, AttributeError, or NameError in Python, which is, ironically, false, because Python is a dynamic language.
To give a concrete example, I went out to GitHub, got into top Python repository (TensorFlow), and searched for a first closed pull request which explicitly mentioned ValueError and did not mention either of the above. It turned out to be this one: https://github.com/tensorflow/tensorflow/pull/47017 This issue is an obvious type error: in statically-typed languages the value of float can not be nil.
You could probably repeat that experiment with other closed pull requests, but I can bet you you will find that the rate will be closer to 50% if not 90%.