Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

>  A user reading that error message could understand that it's 
> okay for weights to be negative as long as the total isn't, 
> which as far as I understand isn't true.

This seems like another made up issue.  One could also argue the opposite case 
that if the error message were changed, a user could reasonably assume that the 
function was in fact checking all the weights individually (which it isn't).

The docs already state that the function assumes non-negative inputs, which is 
in fact what it does.  The function already has reasonable error reporting for 
common missteps.  Also, it behaves gracefully if someone is nudging weights up 
and down in a way that goes slightly negative due to rounding.  Beyond that, 
we're hitting the limits of what it can or should do when fed garbage inputs 
for ill-posed problems.

It's time for this one die now.  It's already eaten an hour of my development 
time explaining how infinities and nans flow through functions and explaining 
what the Python norms are for letting them flow through versus treating them as 
errors.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41773>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to