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.
_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com

Reply via email to