[SciPy-dev] Dealing with precision problem: warning vs raise

David Cournapeau cournape at gmail.com
Wed Nov 5 21:05:11 EST 2008


Hi,

I was looking at bug #651, related to finding the roots of a
polynomial with too small coefficients. Currently, the small values
are discarded by the function in #651, which I find a bid surprising
(it may not be obvious to the user why it gets no zero for a
polynomial of order N). Wouldn't it be better to raise an exception or
a at least a warning instead (I was thinking about doing that in
numpy.roots instead, but that may be too drastic, as it would break
some code - maybe it is desirable, though, as the values in that case
are more or less meaningless )

cheers,

David



More information about the SciPy-Dev mailing list