Skip to content

Commit f832b89

Browse files
committed
moved import of matplotlib to body of devo_numpy function
1 parent 3f096ef commit f832b89

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/compas/numerical/devo/devo_numpy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
from numpy.random import choice
2424
from numpy.random import rand
2525

26-
from matplotlib import pyplot as plt
27-
2826
from scipy.optimize import fmin_l_bfgs_b
2927

3028
except ImportError:
@@ -78,6 +76,8 @@ def devo_numpy(fn, bounds, population, generations, limit=0, elites=0.2, F=0.8,
7876
Values that give the optimum (minimized) function.
7977
8078
"""
79+
if plot:
80+
from matplotlib import pyplot as plt
8181

8282
tic = time()
8383

0 commit comments

Comments
 (0)