CompAero/internal.py
def checkValue(value: Union[Union[float, int], List[Union[float, int]]]) -> bool:
    """ Checks to see if value is non NAN and greater than zero"""
    checkVal = True
    if isinstance(value, (float, int,)):
        value = [value]

    if isinstance(value, list):
        for val in value:
            if isinstance(val, (FlowState, ShockType,)):
                checkVal = checkVal and True
            elif isinstance(val, (float, int,)):
                checkVal = checkVal and not isnan(val)
                checkVal = checkVal and val > 0.0
            else:
                raise TypeError("Cannot validate the given type")
    else:
        raise TypeError("{} Expected a list".format(sys._getframe().f_code.co_name))

    return checkVal
 Checks to see if value is non NAN and greater than zero
Checks to see if value is non NAN and greater than zero
Checks to see if value is non NAN and greater than zero
def checkValue(value: Union[Union[float, int], List[Union[float, int]]]) -> bool:
    checkVal = True
    if isinstance(value, (float, int,)):
        value = [value]
    if isinstance(value, list):
        for val in value:
            if isinstance(val, (FlowState, ShockType,)):
                checkVal = checkVal and True
            elif isinstance(val, (float, int,)):
                checkVal = checkVal and not isnan(val)
                checkVal = checkVal and val > 0.0
            else:
                raise TypeError("Cannot validate the given type")
    else:
        raise TypeError("{} Expected a list".format(sys._getframe().f_code.co_name))
    return checkVal
def checkValue ( value : Union [ Union [ float , int ] , List [ Union [ float , int ] ] ] ) -> bool : checkVal = True if isinstance ( value , ( float , int , ) ) : value = [ value ] if isinstance ( value , list ) : for val in value : if isinstance ( val , ( FlowState , ShockType , ) ) : checkVal = checkVal and True elif isinstance ( val , ( float , int , ) ) : checkVal = checkVal and not isnan ( val ) checkVal = checkVal and val > 0.0 else : raise TypeError ( "Cannot validate the given type" ) else : raise TypeError ( "{} Expected a list" . format ( sys . _getframe ( ) . f_code . co_name ) ) return checkVal
Checks to see if value is non NAN and greater than zero
Checks to see if value is non NAN and greater than zero
""" Checks to see if value is non NAN and greater than zero"""
value
Union[Union[float, int], List[Union[float, int]]]