IntegerArrayValue#
- class ansys.tools.variableinterop.array_values.IntegerArrayValue#
Bases:
ansys.tools.variableinterop.variable_value.CommonArrayValue[numpy.int64]Stores a value as an
IntegerArrayValuevariable type.In Python, the
IntegerArrayValuetype is implemented by extending NumPy’sndarraytype. This means that they decay naturally intonumpy.ndarrayobjects when using NumPy’s array operators. It also means that they inherit many of the NumPy behaviors, which may be slightly different from the behaviors specified in the variable interop standards. For example, when converting from real to integer, the value is floored instead of rounded. If you want the variable interop standard conversions, call theto_integer_array_valuemethod on theRealArrayValuetype and use the resultingIntegerArrayValuetype as you would a NumPyndarrayof int64 values.
Overview#
Convert this value to a |
|
Convert this value to a |
|
Convert this value to a |
|
Convert an API-formatted string to an |
Import detail#
from ansys.tools.variableinterop.array_values import IntegerArrayValue
Property detail#
- property IntegerArrayValue.variable_type: ansys.tools.variableinterop.variable_type.VariableType#
Method detail#
- IntegerArrayValue.__eq__(other)#
- IntegerArrayValue.clone() IntegerArrayValue#
- IntegerArrayValue.accept(visitor: ansys.tools.variableinterop.ivariable_visitor.IVariableValueVisitor[T]) T#
- IntegerArrayValue.to_boolean_array_value() BooleanArrayValue#
Convert this value to a
BooleanArrayValuetype.- Returns:
BooleanArrayValueBooleanArrayValuetype with the same values converted to Boolean values.
- IntegerArrayValue.to_real_array_value() RealArrayValue#
Convert this value to a
RealArrayValuetype.- Returns:
RealArrayValueRealArrayValuetype with the same values converted to real values.
- IntegerArrayValue.to_string_array_value() StringArrayValue#
Convert this value to a
StringArrayValuetype.- Returns:
StringArrayValueStringArrayValuetype converted to an array of strings.
- IntegerArrayValue.to_api_string(context: ansys.tools.variableinterop.isave_context.ISaveContext | None = None) str#
- static IntegerArrayValue.from_api_string(value: str) IntegerArrayValue#
Convert an API-formatted string to an
IntegerArrayValuetype.- Parameters:
- value
str API string to parse.
- value
- Returns:
IntegerArrayValueResult of parsing the
IntegerArrayValuetype.