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

numpy-svn@scip... numpy-svn@scip...
Wed Feb 13 00:11:20 CST 2008


Author: oliphant
Date: 2008-02-13 00:11:19 -0600 (Wed, 13 Feb 2008)
New Revision: 4798

Modified:
   trunk/numpy/core/src/multiarraymodule.c
Log:
Fix ticket #658 which is a segfault on a corner case for copy detection.

Modified: trunk/numpy/core/src/multiarraymodule.c
===================================================================
--- trunk/numpy/core/src/multiarraymodule.c	2008-02-13 05:54:52 UTC (rev 4797)
+++ trunk/numpy/core/src/multiarraymodule.c	2008-02-13 06:11:19 UTC (rev 4798)
@@ -499,8 +499,8 @@
     for (oi=0; oi<oldnd; oi++) op*=olddims[oi];
 
     if (np != op) return 0; /* different total sizes; no hope */
+    if (np == 0) return 1;
 
-
     oi = 0;
     oj = 1;
     ni = 0;



More information about the Numpy-svn mailing list