Skip to content
Snippets Groups Projects
Commit c067005a authored by Colm Talbot's avatar Colm Talbot
Browse files

make astropy import safe

parent 5f78c436
No related branches found
No related tags found
No related merge requests found
......@@ -2,8 +2,12 @@ from __future__ import division
import tupak
import numpy as np
import pandas as pd
from astropy.cosmology import z_at_value, Planck15
import astropy.units as u
try:
from astropy.cosmology import z_at_value, Planck15
import astropy.units as u
except ImportError:
logger.warning("You do not have astropy installed currently. You will "
" not be able to use some of the prebuilt functions.")
from tupak.core.utils import logger
......
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