Skip to content

Commit

Permalink
fix import error for older scipy version
Browse files Browse the repository at this point in the history
  • Loading branch information
internaut committed Mar 4, 2022
1 parent 9de01f0 commit 2c78bb6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion geovoronoi/_voronoi.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@
from collections import defaultdict

import numpy as np
from scipy.spatial import Voronoi, QhullError

try:
from scipy.spatial import Voronoi, QhullError
except ImportError:
from scipy.spatial.qhull import QhullError # for older versions of scipy

from shapely.geometry import box, LineString, Point, MultiPoint, Polygon, MultiPolygon
from shapely.errors import TopologicalError
from shapely.ops import unary_union
Expand Down

0 comments on commit 2c78bb6

Please sign in to comment.