Skip to content

Commit

Permalink
Merge branch 'fix/travis' into enh/norm_units
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Oct 24, 2017
2 parents 2bfc8d7 + d0c9e36 commit 468397b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion nibabel/benchmarks/bench_arrayproxy_slicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ def testfunc():
data[:, 1] = [r[4] for r in results]
try:
data[:, 2] = [r[3] / r[4] for r in results]
except:
except ZeroDivisionError:
data[:, 2] = np.nan
data[:, 3] = [r[5] - r[6] for r in results]

Expand Down
12 changes: 6 additions & 6 deletions nibabel/ecat.py
Original file line number Diff line number Diff line change
Expand Up @@ -468,13 +468,13 @@ def get_series_framenumbers(mlist):
mlist_nframes = len(frames_order)
trueframenumbers = np.arange(nframes - mlist_nframes, nframes)
frame_dict = {}
try:
for frame_stored, (true_order, _) in frames_order.items():
# frame as stored in file -> true number in series
for frame_stored, (true_order, _) in frames_order.items():
# frame as stored in file -> true number in series
try:
frame_dict[frame_stored] = trueframenumbers[true_order] + 1
return frame_dict
except:
raise IOError('Error in header or mlist order unknown')
except IndexError:
raise IOError('Error in header or mlist order unknown')
return frame_dict


def read_subheaders(fileobj, mlist, endianness):
Expand Down
2 changes: 1 addition & 1 deletion nibabel/tests/test_image_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,9 +377,9 @@ def validate_shape(self, imaker, params):

def validate_shape_deprecated(self, imaker, params):
# Check deprecated get_shape API
img = imaker()
with clear_and_catch_warnings() as w:
warnings.simplefilter('always', DeprecationWarning)
img = imaker()
assert_equal(img.get_shape(), params['shape'])
assert_equal(len(w), 1)

Expand Down
2 changes: 1 addition & 1 deletion nibabel/tripwire.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def is_tripwire(obj):
obj.any_attribute
except TripWireError:
return True
except:
except Exception:
pass
return False

Expand Down

0 comments on commit 468397b

Please sign in to comment.