Handle nans

pull/10439/head
Craig Tiller 8 years ago
parent e749e34f07
commit d6d2da1149
  1. 2
      tools/profiling/microbenchmarks/speedup.py

@ -28,6 +28,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from scipy import stats
import math
_THRESHOLD = 0.01
@ -39,6 +40,7 @@ def cmp(a, b):
def speedup(new, old):
s0, p0 = cmp(new, old)
if math.isnan(p0) return 0
if s0 == 0: return 0
if p0 > _THRESHOLD: return 0
if s0 < 0:

Loading…
Cancel
Save