summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic <nouiz@nouiz.org>2013-05-23 11:45:40 -0400
committerFrederic <nouiz@nouiz.org>2013-05-23 11:45:40 -0400
commitc098283224215d656ce259ab7b852a9bf27523e7 (patch)
tree70333e7c1f7e47f8ee481c4bcaefaf9421dcf7f7
parent87801b98ff8317c05197e945416982ef712ff3e5 (diff)
downloadnumpy-c098283224215d656ce259ab7b852a9bf27523e7.tar.gz
code clean up. Remove code that was never executed.
@seberg saw this.
-rw-r--r--numpy/core/src/multiarray/arrayobject.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/numpy/core/src/multiarray/arrayobject.c b/numpy/core/src/multiarray/arrayobject.c
index 706cd4574..dbbabbc99 100644
--- a/numpy/core/src/multiarray/arrayobject.c
+++ b/numpy/core/src/multiarray/arrayobject.c
@@ -1264,7 +1264,6 @@ array_richcompare(PyArrayObject *self, PyObject *other, int cmp_op)
{
PyArrayObject *array_other;
PyObject *result = NULL;
- PyArray_Descr *dtype = NULL;
switch (cmp_op) {
case Py_LT:
@@ -1292,13 +1291,7 @@ array_richcompare(PyArrayObject *self, PyObject *other, int cmp_op)
*/
if (PyArray_TYPE(self) == NPY_VOID) {
- /* Make sure 'other' is an array */
- if (PyArray_TYPE(self) == NPY_OBJECT) {
- dtype = PyArray_DTYPE(self);
- Py_INCREF(dtype);
- }
-
- array_other = (PyArrayObject *)PyArray_FromAny(other, dtype, 0, 0, 0,
+ array_other = (PyArrayObject *)PyArray_FromAny(other, NULL, 0, 0, 0,
NULL);
/*
* If not successful, indicate that the items cannot be compared
@@ -1355,12 +1348,7 @@ array_richcompare(PyArrayObject *self, PyObject *other, int cmp_op)
*/
if (PyArray_TYPE(self) == NPY_VOID) {
- /* Make sure 'other' is an array */
- if (PyArray_TYPE(self) == NPY_OBJECT) {
- dtype = PyArray_DTYPE(self);
- Py_INCREF(dtype);
- }
- array_other = (PyArrayObject *)PyArray_FromAny(other, dtype, 0, 0, 0,
+ array_other = (PyArrayObject *)PyArray_FromAny(other, NULL, 0, 0, 0,
NULL);
/*
* If not successful, indicate that the items cannot be compared