Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(327)

Side by Side Diff: tools/auto_bisect/math_utils.py

Issue 1001033004: Fix style in tools/auto_bisect. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/auto_bisect/fetch_build_test.py ('k') | tools/auto_bisect/query_crbug_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """General statistical or mathematical functions.""" 5 """General statistical or mathematical functions."""
6 6
7 import math 7 import math
8 8
9 9
10 def TruncatedMean(data_set, truncate_proportion): 10 def TruncatedMean(data_set, truncate_proportion):
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 # Redefining built-in 'StandardError' 129 # Redefining built-in 'StandardError'
130 # pylint: disable=W0622 130 # pylint: disable=W0622
131 def StandardError(values): 131 def StandardError(values):
132 """Calculates the standard error of a list of values.""" 132 """Calculates the standard error of a list of values."""
133 # NOTE: This behavior of returning 0.0 in the case of an empty list is 133 # NOTE: This behavior of returning 0.0 in the case of an empty list is
134 # inconsistent with Variance and StandardDeviation above. 134 # inconsistent with Variance and StandardDeviation above.
135 if len(values) <= 1: 135 if len(values) <= 1:
136 return 0.0 136 return 0.0
137 std_dev = StandardDeviation(values) 137 std_dev = StandardDeviation(values)
138 return std_dev / math.sqrt(len(values)) 138 return std_dev / math.sqrt(len(values))
139
OLDNEW
« no previous file with comments | « tools/auto_bisect/fetch_build_test.py ('k') | tools/auto_bisect/query_crbug_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698