当前位置: 首页>>代码示例>>Python>>正文


Python Data.var3方法代码示例

本文整理汇总了Python中SUAVE.Core.Data.var3方法的典型用法代码示例。如果您正苦于以下问题:Python Data.var3方法的具体用法?Python Data.var3怎么用?Python Data.var3使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SUAVE.Core.Data的用法示例。


在下文中一共展示了Data.var3方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: do_this

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import var3 [as 别名]
 def do_this(input1,input2=None):
     """ SUAVE.Attributes.Attribute.do_this(input1,input2=None)
         conditions data for some useful purpose
         
         Inputs:
             input1 - description [units]
             input2 - description [units]
             
         Outpus:
             output1 - description
             output2 - description
             >> try to minimize outputs
             >> pack up outputs into Data() if needed
         
         Assumptions:
             if needed
         
     """
     
     # unpack inputs
     var1 = input1.var1
     var2 = inputs.var2
     
     # setup
     var3 = var1 * var2
     
     # process
     magic = np.log(var3)
     
     # packup outputs
     output = Data()
     output.magic = magic
     output.var3  = var3
     
     return output
开发者ID:aerialhedgehog,项目名称:SUAVE,代码行数:37,代码来源:Example_Attribute.py

示例2: simple_method

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import var3 [as 别名]
def simple_method(input1,input2=None):
    """ SUAVE.Methods.SimpleMethod(input1,input2=None)
        does something useful
        
        Inputs:
            input1 - description [units]
            input2 - description [units]
            
        Outputs:
            output1 - description
            output2 - description
            >> try to minimize outputs
            >> pack up outputs into Data() if needed
        
        Assumptions:
            if needed
        
    """
    
    # unpack inputs
    var1 = input1.var1
    var2 = inputs.var2
    
    # setup
    var3 = var1 * var2
    
    # process
    magic = np.log(var3)
    
    # packup outputs
    output = Data()
    output.magic = magic
    output.var3  = var3
    
    return output
开发者ID:Aircraft-Design-UniNa,项目名称:SUAVE,代码行数:37,代码来源:simple_method.py

示例3: __call__

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import var3 [as 别名]
 def __call__(self,input1,input2=None):
     # the method used with the class is called like a function
     # document at class level
     
     # unpack inputs
     var1 = input1.var1
     var2 = inputs.var2
     
     # setup
     var3 = var1 * var2
     
     # process
     magic = np.log(var3)
     
     # packup outputs
     output = Data()
     output.magic = magic
     output.var3  = var3
     
     return output
开发者ID:Aircraft-Design-UniNa,项目名称:SUAVE,代码行数:22,代码来源:Example_Callable_Attribute.py

示例4: do_this

# 需要导入模块: from SUAVE.Core import Data [as 别名]
# 或者: from SUAVE.Core.Data import var3 [as 别名]
 def do_this(input1,input2=None):
     """<Description>
     
     Assumptions:
     <any assumptions>
     
     Source:
     <source>
     
     Inputs:
     <input1> <units>
     <input2> <units>
     ..
     
     Outputs:
     <output1> <units>
     <output2> <units>
     ..
     
     Properties Used:
     <property1> <units>
     <property2> <units>
     ..
     """           
     
     # unpack inputs
     var1 = input1.var1
     var2 = inputs.var2
     
     # setup
     var3 = var1 * var2
     
     # process
     magic = np.log(var3)
     
     # packup outputs
     output = Data()
     output.magic = magic
     output.var3  = var3
     
     return output
开发者ID:michK,项目名称:SUAVE,代码行数:43,代码来源:Example_Attribute.py


注:本文中的SUAVE.Core.Data.var3方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。