[SciPy-user] "catching warnings"
meesters at uni-mainz.de
Tue Sep 19 03:59:49 CDT 2006
In some cases calling interpolate.splrep results in the following warning:
Warning: The required storage space exceeds the available strorage space.
Probably causes: nest to small or s is too small. (fp>s)
That's a really nice information to prevent the user from making more serious
I'm now trying to use the function in combination with some GUI-code. In my
particular case, smoothing some curves might make sense. For pysical reasons
it only makes sense, if the user applies only a small smoothing factor. Yet,
I'd like to inform the user in case she / he is overdoing it, but have no
chance to calculate a good factor in advance, because this is dataset
dependend. Anyway, I should certainly inform the user about this warning.
Is there a way to "catch" this warning, almost like an exception?
PS Suggestion: Perhaps one could change the lines above into:
Warning: The required storage space exceeds the available storage space.
Probable causes: nest to small or s is too small. (fp>s)
More information about the SciPy-user