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:
2012-08-27 13:40:19 +00:00
parent 590251f55a
commit 77f0be7fec
3 changed files with 4 additions and 4 deletions

View File

@@ -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*/