Feature: Imporved specificity in exceptions raised by random.seed()
When a number is passed to random.seed(), which is otherwise numerically valid, but is of the wrong data type (e.g. a string passed into a Flask app that was not cast to an int type or perhaps a float), a VauleError is raised with an ambiguous caption: `The value [...] cannot be used to seed a numpy.random.RandomState instance`. I realized quickly what the issue was, but in my humble opinion, this looks like something that could trip up a novice user [or a sleep deprived | distracted | in a rush] advanced user. If we provide a more granular explanation of the issue `TypeError('1234' is of type <str>, supported types are <np.int>, <int>, and related types)`, this could be helpful to novice users to more quickly diagnose and fix the problem.
participants (1)
-
David Thrower