Skip to content

Commit

Permalink
Merge pull request #235 from clawpack/python3
Browse files Browse the repository at this point in the history
Additional fixes for compatibility with Python3
  • Loading branch information
ketch authored Dec 20, 2016
2 parents 672f071 + b62db36 commit ededec9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/python/geoclaw/dtopotools.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
unit_conversion_factor['dyne-cm'] = 1.e-7

# Check that these are consistent:
check = [unit_conversion_factor[standard_units[param]] is 1. for param in \
check = [unit_conversion_factor[standard_units[param]] == 1. for param in \
standard_units.keys()]
if not numpy.alltrue(check):
raise ValueError("Conversion factors should be 1 for all standard_units")
Expand Down
4 changes: 2 additions & 2 deletions tests/old_dtopotools.py
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ def plot_subfaults(subfaults, plot_centerline=False, slip_color=False, \
if cmin_slip is None:
cmin_slip = 0.
if test_random:
print("*** test_random == True so slip and rake have been randomized")
print("*** test_random == True so slip and rake have been randomized")

y_ave = 0.
for subfault in subfaults:
Expand Down Expand Up @@ -1419,4 +1419,4 @@ def set_geometry(subfault):
cmd = "geometry['%s'] = %s" % (param,eval(param))
exec(cmd)

return geometry
return geometry
2 changes: 1 addition & 1 deletion tests/storm_surge/regression_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def setUp(self):
with gzip.GzipFile(path, 'r') as gzip_file:
file_content = gzip_file.read()

with open(storm_path, 'w') as out_file:
with open(storm_path, 'wb') as out_file:
out_file.write(file_content)

# Download file
Expand Down

0 comments on commit ededec9

Please sign in to comment.