summaryrefslogtreecommitdiff
path: root/numpy/core/src/scalarmathmodule.c.src
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-07-11 12:08:49 -0600
committerCharles Harris <charlesr.harris@gmail.com>2013-07-11 12:43:18 -0600
commit28eadc0e31ca7aea5c679023d1e703856f45c879 (patch)
treead328cc92dddd315a574aa6b1c3baa948c8982ab /numpy/core/src/scalarmathmodule.c.src
parent49a587cd786242b05fcfd22d5cda961d733b68d4 (diff)
downloadnumpy-28eadc0e31ca7aea5c679023d1e703856f45c879.tar.gz
MAINT: Remove outdated version checks.
Because Numpy 1.8.0 will no longer supports Python versions < 2.6 we no longer need to check for that and can also remove the code that is specific to those earlier versions. To make this a bit safer, the toplevel setup.py file now contains a check of the Python version number and raises an error when run by an unsupported version.
Diffstat (limited to 'numpy/core/src/scalarmathmodule.c.src')
-rw-r--r--numpy/core/src/scalarmathmodule.c.src9
1 files changed, 0 insertions, 9 deletions
diff --git a/numpy/core/src/scalarmathmodule.c.src b/numpy/core/src/scalarmathmodule.c.src
index 0f5f195f4..9247fc47a 100644
--- a/numpy/core/src/scalarmathmodule.c.src
+++ b/numpy/core/src/scalarmathmodule.c.src
@@ -1392,13 +1392,8 @@ emit_complexwarning(void)
assert(cls != NULL);
Py_DECREF(mod);
}
-#if PY_VERSION_HEX >= 0x02050000
return PyErr_WarnEx(cls,
"Casting complex values to real discards the imaginary part", 1);
-#else
- return PyErr_Warn(cls,
- "Casting complex values to real discards the imaginary part");
-#endif
}
/**begin repeat
@@ -1658,9 +1653,7 @@ static PyNumberMethods @name@_as_number = {
(binaryfunc)@name@_true_divide, /*nb_true_divide*/
0, /*nb_inplace_floor_divide*/
0, /*nb_inplace_true_divide*/
-#if PY_VERSION_HEX >= 0x02050000
(unaryfunc)NULL, /*nb_index*/
-#endif
};
/**end repeat**/
@@ -1679,9 +1672,7 @@ add_scalarmath(void)
* Half, Float, Double, LongDouble,
* CFloat, CDouble, CLongDouble#
**/
-#if PY_VERSION_HEX >= 0x02050000
@name@_as_number.nb_index = Py@NAME@ArrType_Type.tp_as_number->nb_index;
-#endif
Py@NAME@ArrType_Type.tp_as_number = &(@name@_as_number);
Py@NAME@ArrType_Type.tp_richcompare = @name@_richcompare;
/**end repeat**/