Skip to content

Commit

Permalink
Fix bad conditional scipy import
Browse files Browse the repository at this point in the history
  • Loading branch information
jmmcd authored Jan 26, 2020
1 parent 0849c25 commit fc32e9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions deap/benchmarks/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
numpy = False

try:
from scipy.spatial import distance
import scipy.spatial
except ImportError:
scipy = False

Expand Down Expand Up @@ -314,5 +314,5 @@ def igd(A, Z):
"""
if not scipy:
raise ImportError("idg requires scipy module")
distances = distance.cdist(A, Z)
distances = scipy.spatial.distance.cdist(A, Z)
return numpy.average(numpy.min(distances, axis=0))

0 comments on commit fc32e9d

Please sign in to comment.