Skip to content

Commit 005c45b

Browse files
committed
Fix Numpy typing
Signed-off-by: Beat Buesser <[email protected]>
1 parent 093b8fd commit 005c45b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

art/attacks/evasion/adversarial_patch/adversarial_patch_pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ def _random_overlay(
394394
mask_2d[:, -edge_w_1:] = False
395395

396396
num_pos = np.nonzero(mask_2d.int())
397-
pos_id = np.random.choice(num_pos.shape[0], size=1, replace=False)
397+
pos_id = np.random.choice(num_pos.shape[0], size=1, replace=False) # type: ignore
398398
pos = num_pos[pos_id[0]]
399399
y_shift = pos[0] - self.image_shape[self.i_h] // 2
400400
x_shift = pos[1] - self.image_shape[self.i_w] // 2

0 commit comments

Comments
 (0)