[llvm-commits] [zorg] r127818 - /zorg/trunk/lnt/lnt/viewer/GraphUtil.py
Daniel Dunbar
daniel at zuster.org
Thu Mar 17 10:36:48 PDT 2011
Author: ddunbar
Date: Thu Mar 17 12:36:48 2011
New Revision: 127818
URL: http://llvm.org/viewvc/llvm-project?rev=127818&view=rev
Log:
lnt.viewer.GraphUtil: Don't crash if linregress blows up.
Modified:
zorg/trunk/lnt/lnt/viewer/GraphUtil.py
Modified: zorg/trunk/lnt/lnt/viewer/GraphUtil.py
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/lnt/lnt/viewer/GraphUtil.py?rev=127818&r1=127817&r2=127818&view=diff
==============================================================================
--- zorg/trunk/lnt/lnt/viewer/GraphUtil.py (original)
+++ zorg/trunk/lnt/lnt/viewer/GraphUtil.py Thu Mar 17 12:36:48 2011
@@ -88,11 +88,12 @@
norm_xs = [(x - x_min) / (x_max - x_min)
for x in xs]
- # FIXME: When can this raise ZeroDivisionError?
try:
info = ext_stats.linregress(norm_xs, ys)
except ZeroDivisionError:
info = None
+ except ValueError:
+ info = None
if info is not None:
slope, intercept,_,_,_ = info
More information about the llvm-commits
mailing list