Skip to content

Commit

Permalink
Merge pull request #23 from NOhs/removed_unnecessary_copy
Browse files Browse the repository at this point in the history
Removed unnecessary copy and unnecessary shadowing of names.
  • Loading branch information
NOhs authored Sep 24, 2019
2 parents b834e8d + 48773dd commit 001b202
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions affine_transform/affine_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@ def transform(
)

if order == "linear":
transform = _affine_transform.transform_linear
_transform = _affine_transform.transform_linear
elif order == "cubic":
transform = _affine_transform.transform_cubic
_transform = _affine_transform.transform_cubic
else:
raise ValueError(
f'Order was given as "{order}". But only "cubic" and "linear" are valid options.'
Expand All @@ -144,10 +144,10 @@ def transform(

origin = (linear_transformation @ (-translation - origin)) + origin

transform(
_transform(
origin,
linear_transformation.T, # columns
input_image.astype(dtype),
input_image.astype(dtype, copy=False),
output_image,
background_value,
)
Expand Down

0 comments on commit 001b202

Please sign in to comment.