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

@@ -903,7 +903,7 @@ static PyNumberMethods Quaternion_NumMethods = {
NULL, /*nb_divmod*/
NULL, /*nb_power*/
(unaryfunc) Quaternion_neg, /*nb_negative*/
(unaryfunc) 0, /*tp_positive*/
(unaryfunc) Quaternion_copy,/*tp_positive*/
(unaryfunc) 0, /*tp_absolute*/
(inquiry) 0, /*tp_bool*/
(unaryfunc) 0, /*nb_invert*/