Skip to content

Commit 839a3eb

Browse files
github-actionsgithub-actions
github-actions
authored and
github-actions
committed
fixup! Format Python code with psf/black push
1 parent 6e5fe3a commit 839a3eb

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

data_structures/queue/circular_queue.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Implementation of Circular Queue (using Python lists)
22

3+
34
class CircularQueue:
45
"""Circular FIFO queue with a fixed capacity"""
56

@@ -59,7 +60,7 @@ def enqueue(self, data):
5960
raise Exception("QUEUE IS FULL")
6061

6162
self.array[self.rear] = data
62-
self.rear = (self.rear+1)%self.n
63+
self.rear = (self.rear + 1) % self.n
6364
self.size += 1
6465
return self
6566

@@ -88,6 +89,6 @@ def dequeue(self):
8889

8990
temp = self.array[self.front]
9091
self.array[self.front] = None
91-
self.front = (self.front + 1)%self.n
92+
self.front = (self.front + 1) % self.n
9293
self.size -= 1
9394
return temp

digital_image_processing/filters/gaussian_filter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ def gaussian_filter(image, k_size, sigma):
2222
# im2col, turn the k_size*k_size pixels into a row and np.vstack all rows
2323
image_array = zeros((dst_height * dst_width, k_size * k_size))
2424
row = 0
25-
for i, j in product(range(dst_height), range(dst_width)):
26-
window = ravel(image[i : i + k_size, j : j + k_size])
27-
image_array[row, :] = window
28-
row += 1
25+
for i, j in product(range(dst_height), range(dst_width)):
26+
window = ravel(image[i : i + k_size, j : j + k_size])
27+
image_array[row, :] = window
28+
row += 1
2929

3030
# turn the kernel into shape(k*k, 1)
3131
gaussian_kernel = gen_gaussian_kernel(k_size, sigma)

0 commit comments

Comments
 (0)