# 菜鸟 深 学 的 逆袭 之 路 # day6

It turns out that the quotient and the remainder can be operated at the same time. The most amazing thing is that some people know that tm, let me go.  .  .

numpy pad operation, three-dimensional padding, simple and direct pictures

numpy pad 2D operation, the picture is simple and direct

def create_mask_from_window(x):
mask = x == np.max(x)
return mask

The function is to return the maximum mask in the matrix, the operation is very beautiful. Determine whether each value in the x matrix is ​​equal to the maximum value one by one, whether it returns True, whether it returns False

Published 31 original articles · praised 0 · visits 684

Guess you like

Origin blog.csdn.net/ballzy/article/details/105296784