Skip to content

Commit c8b83e5

Browse files
committed
style: change flip_image to pass attribute to make change
1 parent 03ae177 commit c8b83e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/diffpy/srxplanar/loadimage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def __init__(self, p):
5454
self.config = p
5555
return
5656

57-
def flip_image(self, pic, fliphorizontal=False, flipvertical=False):
57+
def flip_image(self, pic):
5858
"""Flip image if configured in config.
5959
6060
:param pic: 2d array, image array
@@ -66,7 +66,7 @@ def flip_image(self, pic, fliphorizontal=False, flipvertical=False):
6666
pic = np.array(pic[::-1, :])
6767
return pic
6868

69-
def load_image(self, filename, fliphorizontal=False, flipvertical=False):
69+
def load_image(self, filename):
7070
"""Load image file. If loading fails (e.g. incomplete file),
7171
retry for 5 seconds (10×0.5s).
7272
@@ -99,7 +99,7 @@ def load_image(self, filename, fliphorizontal=False, flipvertical=False):
9999
break
100100
except FileNotFoundError:
101101
time.sleep(0.5)
102-
image = self.flip_image(image, fliphorizontal, flipvertical)
102+
image = self.flip_image(image)
103103
image[image < 0] = 0
104104
return image
105105

0 commit comments

Comments
 (0)