On 02/03/2014 08:55 PM, Faraz Mirzaei wrote:
Thanks Andy. I'll wait for your input (and will check the bug reports myself as well), before creating a new PR.
I hope I find the time soon :-/
Usually the reason to do this is that the error generated is not very helpful to the user. In scikit-learn, I think we ususally try to give high level feedback about what went wrong, instead of the often obscure error messages that would be generated by the actual failure. On the other hand, we usually don't catch anything that doesn't need catching. So we gotta check here.In the mean time, I wonder why you would even need to do a type checking here? As far as I know, Python strongly encourages duck typing. Why not remove the type checking altogether and just let the exception "bubble up" when the duck cannot quack (i.e., when the score function output cannot be used by the respective caller)?
------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________ Scikit-learn-general mailing list Scikit-learn-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/scikit-learn-general