You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The math_Vector.Set method throws a TypeError when attempting to set values in Python. The error message indicates that the wrong number or type of arguments is being passed to the method. This issue occurs even when the arguments appear to match the expected usage based on the C++ prototypes provided in the error message.
Environment:
Library: pythonocc-core
Version: 7.8.0
Platform: Windows
Python Version: 3.11.9
Sample Code:
fromOCC.Core.mathimportmath_Vector# Initialize a math_Vector with a valid rangenb_variables=3starting_point=math_Vector(1, nb_variables, 1)
# Attempt to set valuesstarting_point.Set(1, 1.0)
# TypeError: Wrong number or type of arguments for overloaded function 'math_Vector_Set'.# Possible C/C++ prototypes are:# math_VectorBase< double >::Set(Standard_Integer const,Standard_Integer const,math_VectorBase< double > const &)# math_VectorBase< double >::operator =(math_VectorBase< double > const &)starting_point.Set(1, 1, math_Vector(1, 1, 0)) # succesestarting_point.Set(1, 2, math_Vector(1, 1, 0))
# RuntimeError: Standard_RangeErrormath_VectorBase::Set() - invalid indices raised from method Set of class math_VectorBase< double >
The text was updated successfully, but these errors were encountered:
Description:
The
math_Vector.Set
method throws aTypeError
when attempting to set values in Python. The error message indicates that the wrong number or type of arguments is being passed to the method. This issue occurs even when the arguments appear to match the expected usage based on the C++ prototypes provided in the error message.Environment:
Sample Code:
The text was updated successfully, but these errors were encountered: