Skip to content

Commit 1dd2450

Browse files
committed
Solve type checker error in image
1 parent 99306af commit 1dd2450

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

gramps_webapi/api/image.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,7 @@ def detect_faces(stream: BinaryIO) -> list[tuple[float, float, float, float]]:
250250
# Extract and normalize face bounding boxes
251251
detected_faces = []
252252
for face in faces[1]:
253-
x, y, w, h = np.asarray(face)[:4]
254-
x = float(x)
255-
y = float(y)
256-
w = float(w)
257-
h = float(h)
253+
x, y, w, h = map(float, np.asarray(face)[:4])
258254
detected_faces.append(
259255
(
260256
100 * x / width,

0 commit comments

Comments
 (0)