RealArrayValue#

class ansys.tools.variableinterop.array_values.RealArrayValue#

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

Stores a value as a RealArrayValue variable type.

In Python, the RealArrayValue 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_integer_array_value

Convert this value to an IntegerArrayValue type.

to_string_array_value

Convert the value to a StringArrayValue type.

to_api_string

to_display_string

from_api_string

Convert an API-formatted string to the RealArrayValue type.

Import detail#

from ansys.tools.variableinterop.array_values import RealArrayValue

Property detail#

property RealArrayValue.variable_type: ansys.tools.variableinterop.variable_type.VariableType#

Method detail#

RealArrayValue.__eq__(other: RealArrayValue) bool#
RealArrayValue.clone() RealArrayValue#
RealArrayValue.accept(visitor: ansys.tools.variableinterop.ivariable_visitor.IVariableValueVisitor[T]) T#
RealArrayValue.to_boolean_array_value() BooleanArrayValue#

Convert this value to a BooleanArrayValue type.

Returns:
BooleanArrayValue

BooleanArrayValue type with the same values converted to Boolean values.

RealArrayValue.to_integer_array_value() IntegerArrayValue#

Convert this value to an IntegerArrayValue type.

Returns:
IntegerArrayValue

IntegerArrayValue type with the same values converted to integers.

RealArrayValue.to_string_array_value() StringArrayValue#

Convert the value to a StringArrayValue type.

Returns:
StringArrayValue

StringArrayValue type with the same value converted to strings.

RealArrayValue.to_api_string(context: ansys.tools.variableinterop.isave_context.ISaveContext | None = None) str#
static RealArrayValue.from_api_string(value: str) RealArrayValue#

Convert an API-formatted string to the RealArrayValue type.

Parameters:
valuestr

API string to parse.

Returns:
RealArrayValue

Result of parsing the RealArrayValue type.

RealArrayValue.to_display_string(locale_name: str) str#