Closed martinfleis closed 2 years ago
If you don't have astropy, pycno errors in a way it should not.
def pycno( gdf, value_field, cellsize, r=0.2, handle_null=True, converge=3, verbose=True ): try: from astropy.convolution import convolve as astro_convolve except Exception: > raise ("Pycnophylactic interpolation requires the astropy package") E TypeError: exceptions must derive from BaseException
I guess we should do
try: from astropy.convolution import convolve as astro_convolve except (ImportError, ModuleNotFoundError): raise ImportError("Pycnophylactic interpolation requires the astropy package")
That way we also pass through any other errors that may be coming from astropy. I'll make a PR.
If you don't have astropy, pycno errors in a way it should not.
I guess we should do
That way we also pass through any other errors that may be coming from astropy. I'll make a PR.