Skip to content

Commit e8234de

Browse files
committed
Resolved Python 3 compatibility issues.
1 parent 0dfbf8c commit e8234de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bbp/utils/misc/create_dreger_fig3.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
"""
17+
from __future__ import division, print_function
1718

1819
# Import Python modules
1920
import os
@@ -125,7 +126,7 @@ def summarize_and_plot_data(data, method, output_file):
125126
np.sum((x - np.mean(x)) * (x - np.mean(x))))
126127

127128
xx = np.linspace(min(x), max(x),
128-
num=(int(math.ceil((max(x)-min(x))/0.1))))
129+
num=(int(math.ceil((max(x) - min(x)) / 0.1))))
129130
yy = slope * xx + intercept
130131

131132
# Calculate 95% confidence bounds
@@ -169,7 +170,7 @@ def main():
169170
Main function
170171
"""
171172
if len(sys.argv) != 2:
172-
print "Usage: %s input_file" % (sys.argv[0])
173+
print("Usage: %s input_file" % (sys.argv[0]))
173174
sys.exit(0)
174175

175176
# Output filename
@@ -181,6 +182,5 @@ def main():
181182
data = read_data(input_file)
182183
summarize_and_plot_data(data, method, output_file)
183184

184-
185185
if __name__ == "__main__":
186186
main()

0 commit comments

Comments
 (0)