IntegerArrayValue#

class ansys.tools.variableinterop.array_values.IntegerArrayValue#

Bases: ansys.tools.variableinterop.variable_value.CommonArrayValue[numpy.int64]

Stores a value as an IntegerArrayValue variable type.

In Python, the IntegerArrayValue type is implemented by extending NumPy’s ndarray type. This means that they decay naturally into numpy.ndarray objects 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 the to_integer_array_value method on the RealArrayValue type and use the resulting IntegerArrayValue type as you would a NumPy ndarray of int64 values.

Overview#

clone

accept

to_boolean_array_value

Convert this value to a BooleanArrayValue type.

to_real_array_value

Convert this value to a RealArrayValue type.

to_string_array_value

Convert this value to a StringArrayValue type.

to_api_string

to_display_string

from_api_string

Convert an API-formatted string to an IntegerArrayValue type.

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 BooleanArrayValue type.

Returns:
BooleanArrayValue

BooleanArrayValue type with the same values converted to Boolean values.

IntegerArrayValue.to_real_array_value() RealArrayValue#

Convert this value to a RealArrayValue type.

Returns:
RealArrayValue

RealArrayValue type with the same values converted to real values.

IntegerArrayValue.to_string_array_value() StringArrayValue#

Convert this value to a StringArrayValue type.

Returns:
StringArrayValue

StringArrayValue type 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 IntegerArrayValue type.

Parameters:
valuestr

API string to parse.

Returns:
IntegerArrayValue

Result of parsing the IntegerArrayValue type.

IntegerArrayValue.to_display_string(locale_name: str) str#