Skip to content

Commit

Permalink
BENCH: split spatial benchmark imports
Browse files Browse the repository at this point in the history
As the different parts were added at different times, it's better to
import them separately so that only specific benchmarks stop working for
old scipy versions.
  • Loading branch information
pv committed Sep 24, 2017
1 parent ff052f6 commit 7552935
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions benchmarks/benchmarks/spatial.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,22 @@
import numpy as np

try:
from scipy.spatial import (cKDTree, KDTree, SphericalVoronoi, distance,
ConvexHull, Voronoi)
from scipy.spatial import cKDTree, KDTree
except ImportError:
pass

try:
from scipy.spatial import distance
except ImportError:
pass

try:
from scipy.spatial import ConvexHull, Voronoi
except ImportError:
pass

try:
from scipy.spatial import SphericalVoronoi
except ImportError:
pass

Expand Down

0 comments on commit 7552935

Please sign in to comment.