Skip to content

Commit 208591d

Browse files
author
Beat Buesser
committed
Fix import of matplotlib in laser attack utils
Signed-off-by: Beat Buesser <[email protected]>
1 parent 40afe64 commit 208591d

File tree

1 file changed

+2
-1
lines changed
  • art/attacks/evasion/laser_attack

1 file changed

+2
-1
lines changed

art/attacks/evasion/laser_attack/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
from typing import Any, Callable, List, Tuple, Union
2828

2929
import numpy as np
30-
import matplotlib.pyplot as plt
3130

3231

3332
class Line:
@@ -256,6 +255,8 @@ def save_nrgb_image(image: np.ndarray, number=0, name_length=5, directory="attac
256255
:param name_length: Length of the random string in the name.
257256
:param directory: Directory where images will be saved.
258257
"""
258+
import matplotlib.pyplot as plt
259+
259260
alphabet = np.array(list(string.ascii_letters))
260261
Path(directory).mkdir(exist_ok=True)
261262
im_name = f"{directory}/{number}_{''.join(np.random.choice(alphabet, size=name_length))}.jpg"

0 commit comments

Comments
 (0)