def isNumber(val):
    """
    Tests if this is a number in base python or sympy.

    Parameters
    ----------
    val: float/int/complex/sympy.expression

    Returns
    -------
    bool
    """
    try:
        _ = complex(val)
        return True
    except TypeError:
        return False