Skip to content

Commit

Permalink
Reformat with black
Browse files Browse the repository at this point in the history
  • Loading branch information
zimmerrol committed Oct 27, 2023
1 parent beaaee6 commit aded899
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions foolbox/attacks/pointwise.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,12 @@ def run(
while i < max([len(it) for it in untouched_indices]):
# mask all samples that still have pixels to manipulate left
relevant_mask_lst = [len(it) > i for it in untouched_indices]
relevant_mask: np.ndarray[Any, np.dtype[np.bool_]] = np.array(relevant_mask_lst, dtype=bool)
relevant_mask_index: np.ndarray[Any, np.dtype[np.int_]] = np.flatnonzero(relevant_mask)
relevant_mask: np.ndarray[Any, np.dtype[np.bool_]] = np.array(
relevant_mask_lst, dtype=bool
)
relevant_mask_index: np.ndarray[
Any, np.dtype[np.int_]
] = np.flatnonzero(relevant_mask)

# for each image get the index of the next pixel we try out
relevant_indices = [it[i] for it in untouched_indices if len(it) > i]
Expand Down

0 comments on commit aded899

Please sign in to comment.