diff options
author | Travis Oliphant <oliphant@enthought.com> | 2006-09-07 00:34:30 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2006-09-07 00:34:30 +0000 |
commit | c4b98bdd9b0046494c1f972912137b4a7e5c6874 (patch) | |
tree | a1ff16c365f6dcaf5e4c06ac4743c235d8e5c6d0 /numpy | |
parent | f34278fc690fa577523eadcef70dc378bff1dbb7 (diff) | |
download | numpy-c4b98bdd9b0046494c1f972912137b4a7e5c6874.tar.gz |
More code cleanup
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/core/src/arrayobject.c | 9 | ||||
-rw-r--r-- | numpy/core/src/multiarraymodule.c | 3 |
2 files changed, 5 insertions, 7 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index a64008dc9..9e8915c4e 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -12,6 +12,7 @@ Heavily modified in 2005 with inspiration from Numarray by Travis Oliphant, oliphant@ee.byu.edu +Brigham Young Univeristy maintainer email: oliphant.travis@ieee.org @@ -2432,7 +2433,8 @@ PyArray_SetMap(PyArrayMapIterObject *mit, PyObject *op) PyArray_Item_INCREF(it->dataptr, PyArray_DESCR(arr)); memmove(mit->dataptr, it->dataptr, sizeof(PyObject *)); /* ignored unless VOID array with object's */ - copyswap(mit->dataptr, NULL, swap, arr); + if (swap) + copyswap(mit->dataptr, NULL, swap, arr); PyArray_MapIterNext(mit); PyArray_ITER_NEXT(it); } @@ -9699,11 +9701,6 @@ PyArray_MapIterBind(PyArrayMapIterObject *mit, PyArrayObject *arr) mit->ait = (PyArrayIterObject *)PyArray_IterNew((PyObject *)arr); if (mit->ait == NULL) return; - /* If this is just a view, then do nothing more */ - /* views are handled by just adjusting the strides - and dimensions of the object. - */ - /* no subspace iteration needed. Finish up and Return */ if (subnd == 0) { n = arr->nd; diff --git a/numpy/core/src/multiarraymodule.c b/numpy/core/src/multiarraymodule.c index 14daa8014..4f2f697a1 100644 --- a/numpy/core/src/multiarraymodule.c +++ b/numpy/core/src/multiarraymodule.c @@ -5,10 +5,11 @@ Original file Copyright (c) 1995, 1996, 1997 Jim Hugunin, hugunin@mit.edu - Modified extensively for numpy in 2005 + Modified for numpy in 2005 Travis E. Oliphant oliphant@ee.byu.edu + Brigham Young University */ /* $Id: multiarraymodule.c,v 1.36 2005/09/14 00:14:00 teoliphant Exp $ */ |