def dfromdm ( dm ) : if np . size ( dm ) > 1 : dm = np . atleast_1d ( dm ) return 10 ** ( 1 + dm / 5 )
how to make a distance function in python
Returns distance given distance modulus .
def dfromdm(dm):
    """Returns distance given distance modulus.
    """
    if np.size(dm)>1:
        dm = np.atleast_1d(dm)
    return 10**(1+dm/5)