[Numpy-svn] r3127 - trunk/numpy/core/src

numpy-svn at scipy.org numpy-svn at scipy.org
Wed Sep 6 19:34:33 CDT 2006


Author: oliphant
Date: 2006-09-06 19:34:30 -0500 (Wed, 06 Sep 2006)
New Revision: 3127

Modified:
   trunk/numpy/core/src/arrayobject.c
   trunk/numpy/core/src/multiarraymodule.c
Log:
More code cleanup

Modified: trunk/numpy/core/src/arrayobject.c
===================================================================
--- trunk/numpy/core/src/arrayobject.c	2006-09-06 22:49:46 UTC (rev 3126)
+++ trunk/numpy/core/src/arrayobject.c	2006-09-07 00:34:30 UTC (rev 3127)
@@ -12,6 +12,7 @@
 by
 
 Travis Oliphant,  oliphant at ee.byu.edu
+Brigham Young Univeristy
 
 maintainer email:  oliphant.travis at ieee.org
 
@@ -2432,7 +2433,8 @@
                         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 @@
         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;

Modified: trunk/numpy/core/src/multiarraymodule.c
===================================================================
--- trunk/numpy/core/src/multiarraymodule.c	2006-09-06 22:49:46 UTC (rev 3126)
+++ trunk/numpy/core/src/multiarraymodule.c	2006-09-07 00:34:30 UTC (rev 3127)
@@ -5,10 +5,11 @@
   Original file
   Copyright (c) 1995, 1996, 1997 Jim Hugunin, hugunin at mit.edu
 
-  Modified extensively for numpy in 2005
+  Modified for numpy in 2005
 
   Travis E. Oliphant
   oliphant at ee.byu.edu
+  Brigham Young University
 */
 
 /* $Id: multiarraymodule.c,v 1.36 2005/09/14 00:14:00 teoliphant Exp $ */



More information about the Numpy-svn mailing list