Skip to content

Б12-514 Лодыгин Антон#185

Open
bermo0d wants to merge 1 commit into
EvgrafovMichail:mainfrom
bermo0d:hw-lesson04
Open

Б12-514 Лодыгин Антон#185
bermo0d wants to merge 1 commit into
EvgrafovMichail:mainfrom
bermo0d:hw-lesson04

Conversation

@bermo0d
Copy link
Copy Markdown

@bermo0d bermo0d commented Mar 13, 2026

No description provided.

@Avshugan Avshugan added the 514 label Mar 16, 2026
padded = np.zeros((new_h, new_w), dtype=image.dtype)
padded[pad_size : pad_size + h, pad_size : pad_size + w] = image

elif image.ndim == 3:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Можно было без if и тогда код был бы проще (меньше повторения кода)

max_pixels = pixels
best_color = color

return np.uint8(best_color), (max_pixels / pixels.size) * 100
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не проходит тесты, так как pixels было переопределено на строке 25 и оно имеет size равный 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants