summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-09-07 06:27:49 -0700
committerCharles Harris <charlesr.harris@gmail.com>2013-09-07 06:27:49 -0700
commit7679c14ab9b293dd80c0800a180eb9f939e991e9 (patch)
tree643bd8084f79bec722056152ae8ff7518b4a4e2e /numpy
parent1ec94198399e91baf562799548c443040532cd0b (diff)
parentba08629ba9972b88c1f172ec655e13d3b9c3b21c (diff)
downloadnumpy-7679c14ab9b293dd80c0800a180eb9f939e991e9.tar.gz
Merge pull request #3694 from juliantaylor/test-rational-fix
BUG: fix test_rational PyNumberMethods for python3
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/umath/test_rational.c.src12
1 files changed, 12 insertions, 0 deletions
diff --git a/numpy/core/src/umath/test_rational.c.src b/numpy/core/src/umath/test_rational.c.src
index fa3f903b4..1650dd1d3 100644
--- a/numpy/core/src/umath/test_rational.c.src
+++ b/numpy/core/src/umath/test_rational.c.src
@@ -604,7 +604,9 @@ static PyNumberMethods pyrational_as_number = {
pyrational_add, /* nb_add */
pyrational_subtract, /* nb_subtract */
pyrational_multiply, /* nb_multiply */
+#if PY_MAJOR_VERSION < 3
pyrational_divide, /* nb_divide */
+#endif
pyrational_remainder, /* nb_remainder */
0, /* nb_divmod */
0, /* nb_power */
@@ -618,17 +620,27 @@ static PyNumberMethods pyrational_as_number = {
0, /* nb_and */
0, /* nb_xor */
0, /* nb_or */
+#if PY_MAJOR_VERSION < 3
0, /* nb_coerce */
+#endif
pyrational_int, /* nb_int */
+#if PY_MAJOR_VERSION < 3
pyrational_int, /* nb_long */
+#else
+ 0, /* reserved */
+#endif
pyrational_float, /* nb_float */
+#if PY_MAJOR_VERSION < 3
0, /* nb_oct */
0, /* nb_hex */
+#endif
0, /* nb_inplace_add */
0, /* nb_inplace_subtract */
0, /* nb_inplace_multiply */
+#if PY_MAJOR_VERSION < 3
0, /* nb_inplace_divide */
+#endif
0, /* nb_inplace_remainder */
0, /* nb_inplace_power */
0, /* nb_inplace_lshift */