diff --git a/esda/map_comparison.py b/esda/map_comparison.py index 3b82d9cd..99eccf76 100644 --- a/esda/map_comparison.py +++ b/esda/map_comparison.py @@ -3,7 +3,7 @@ try: import pygeos -except: +except (ImportError, ModuleNotFoundError): pass # gets handled in the _cast function. # from nowosad and stepinski diff --git a/esda/shape.py b/esda/shape.py index 9ac6d96c..0e03a411 100644 --- a/esda/shape.py +++ b/esda/shape.py @@ -1,5 +1,11 @@ import numpy import pandas + +try: + import pygeos +except (ImportError, ModuleNotFoundError): + pass # gets handled at the _cast level. + from .crand import njit, prange