support unary positive operators for vectors (same as numpy), so you can do 'vector_a = +vector_b', this makes a copy.
This commit is contained in:
@@ -2046,7 +2046,7 @@ static PyNumberMethods Vector_NumMethods = {
|
||||
NULL, /*nb_divmod*/
|
||||
NULL, /*nb_power*/
|
||||
(unaryfunc) Vector_neg, /*nb_negative*/
|
||||
(unaryfunc) NULL, /*tp_positive*/
|
||||
(unaryfunc) Vector_copy,/*tp_positive*/
|
||||
(unaryfunc) NULL, /*tp_absolute*/
|
||||
(inquiry) NULL, /*tp_bool*/
|
||||
(unaryfunc) NULL, /*nb_invert*/
|
||||
|
Reference in New Issue
Block a user