CommonArrayValue#
- class ansys.tools.variableinterop.variable_value.CommonArrayValue(shape, dtype=float, buffer=None, offset=0, strides=None, order=None)#
Bases:
Generic[T],numpy.ndarray[Any,numpy.dtype[T]],IVariableValue,abc.ABCDefines an interface for the behavior common among all array types.
This class inherits the
IVariableValueclass.The
numpy.ndarraybase is spelled out rather than written asnumpy.typing.NDArray[T]. NumPy 2.5 redefinedNDArrayas a PEP 695 type alias, which cannot be used as a base class: at runtime its__mro_entries__no longer resolves tonumpy.ndarray, which raises a metaclass conflict againstABCMeta. Writing the parameterizedndarraydirectly resolves tonumpy.ndarrayon every supported NumPy version while keeping the element type visible to type checkers.
Overview#
Get the dimension sizes of the array. |
|
Get the number of dimensions in the array. |
Import detail#
from ansys.tools.variableinterop.variable_value import CommonArrayValue