Skip to content
Snippets Groups Projects
Commit c8d7341f authored by Gregory Ashton's avatar Gregory Ashton
Browse files

Add astropy

parent 28123e71
No related branches found
No related tags found
1 merge request!747Changes the warning messages to debug messages for gw-related codes
Pipeline #111308 passed
......@@ -990,7 +990,7 @@ class BilbyJsonEncoder(json.JSONEncoder):
if isinstance(obj, units.PrefixUnit):
return str(obj)
except ImportError:
logger.info("Cannot import astropy, cannot write cosmological priors")
logger.debug("Cannot import astropy, cannot write cosmological priors")
if isinstance(obj, np.ndarray):
return {'__array__': True, 'content': obj.tolist()}
if isinstance(obj, complex):
......@@ -1052,8 +1052,8 @@ def decode_astropy_cosmology(dct):
del dct['__cosmology__'], dct['__name__']
return cosmo_cls(**dct)
except ImportError:
logger.info("Cannot import astropy, cosmological priors may not be "
"properly loaded.")
logger.debug("Cannot import astropy, cosmological priors may not be "
"properly loaded.")
return dct
......@@ -1066,8 +1066,8 @@ def decode_astropy_quantity(dct):
del dct['__astropy_quantity__']
return units.Quantity(**dct)
except ImportError:
logger.info("Cannot import astropy, cosmological priors may not be "
"properly loaded.")
logger.debug("Cannot import astropy, cosmological priors may not be "
"properly loaded.")
return dct
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment