InputsScale#
- class ansys.dpf.core.operators.math.scale.InputsScale(op: ansys.dpf.core.dpf_operator.Operator)#
Bases:
ansys.dpf.core.inputs._InputsIntermediate class used to connect user inputs to scale operator.
Examples
>>> from ansys.dpf import core as dpf >>> op = dpf.operators.math.scale() >>> my_field = dpf.Field() >>> op.inputs.field.connect(my_field) >>> my_weights = float() >>> op.inputs.weights.connect(my_weights) >>> my_boolean = bool() >>> op.inputs.boolean.connect(my_boolean) >>> my_algorithm = int() >>> op.inputs.algorithm.connect(my_algorithm)
Overview#
Connect any input (an entity or an operator output) to any input pin of this operator. |
Import detail#
from ansys.dpf.core.operators.math.scale import InputsScale
Property detail#
- property InputsScale.field: ansys.dpf.core.inputs.Input[ansys.dpf.core.field.Field | ansys.dpf.core.fields_container.FieldsContainer]#
Allows to connect field input to the operator.
field or fields container with only one field is expected
- Returns:
An Input instance for this pin.
- Return type:
input
Examples
>>> from ansys.dpf import core as dpf >>> op = dpf.operators.math.scale() >>> op.inputs.field.connect(my_field) >>> # or >>> op.inputs.field(my_field)
- property InputsScale.weights: ansys.dpf.core.inputs.Input[float | ansys.dpf.core.field.Field]#
Allows to connect weights input to the operator.
Double/Field/Vector of doubles. When scoped on overall, same value(s) applied on all the data, when scoped elsewhere, corresponding values will be multiplied due to the scoping
- Returns:
An Input instance for this pin.
- Return type:
input
Examples
>>> from ansys.dpf import core as dpf >>> op = dpf.operators.math.scale() >>> op.inputs.weights.connect(my_weights) >>> # or >>> op.inputs.weights(my_weights)
- property InputsScale.boolean: ansys.dpf.core.inputs.Input[bool]#
Allows to connect boolean input to the operator.
Default is false. If set to true, output of scale is made dimensionless
- Returns:
An Input instance for this pin.
- Return type:
input
Examples
>>> from ansys.dpf import core as dpf >>> op = dpf.operators.math.scale() >>> op.inputs.boolean.connect(my_boolean) >>> # or >>> op.inputs.boolean(my_boolean)
- property InputsScale.algorithm: ansys.dpf.core.inputs.Input[int]#
Allows to connect algorithm input to the operator.
Algorithm selection: 0 (default) uses MKL for optimization, 1 uses standard loops
- Returns:
An Input instance for this pin.
- Return type:
input
Examples
>>> from ansys.dpf import core as dpf >>> op = dpf.operators.math.scale() >>> op.inputs.algorithm.connect(my_algorithm) >>> # or >>> op.inputs.algorithm(my_algorithm)
Method detail#
- InputsScale.__getattr__(name)#
- InputsScale.__str__()#
- InputsScale.connect(inpt)#
Connect any input (an entity or an operator output) to any input pin of this operator.
Searches for the input type corresponding to the output.
Deprecated since version Deprecated: in favor of explicit output-to-input connections.
- InputsScale.__call__(inpt)#