def METHOD_NAME(moment):
    '''
    Uses Hanks & Kanamori formula for calculating moment magnitude from
    a scalar moment (Nm)
    '''
    if isinstance(moment, np.ndarray):
        return (2. / 3.) * (np.log10(moment) - 9.05)
    else:
        return (2. / 3.) * (log10(moment) - 9.05)