Skip to content

Commit

Permalink
ENH: Remove unused variable warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
hjmjohnson committed Oct 19, 2020
1 parent 0c4269c commit 1b1bf30
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions Wrapping/Generators/Python/itkExtras.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@ def _GetArrayFromImage(image_or_filter, function, keep_axes, update):
keys = [k for k in itk.PyBuffer.keys() if k[0] == output(image_or_filter).__class__]
if len(keys) == 0:
raise RuntimeError("No suitable template parameter can be found.")
ImageType = keys[0]
# Create a numpy array of the type of the input image
templatedFunction = getattr(itk.PyBuffer[keys[0]], function)
return templatedFunction(output(image_or_filter), keep_axes, update)
Expand Down Expand Up @@ -1145,11 +1144,7 @@ def __iter__(self):
yield k

def has_key(self, key):
try:
value = self[key]
except KeyError:
return False
return True
return key in self.__templates__

def __contains__(self, key):
return key in self
Expand Down

0 comments on commit 1b1bf30

Please sign in to comment.