[Numpy-svn] r2801 - in trunk/numpy/core: . src

numpy-svn at scipy.org numpy-svn at scipy.org
Tue Jul 11 12:05:00 EDT 2006


Author: oliphant
Date: 2006-07-11 11:04:38 -0500 (Tue, 11 Jul 2006)
New Revision: 2801

Modified:
   trunk/numpy/core/records.py
   trunk/numpy/core/src/arrayobject.c
Log:
Fix casting of signed ints to unsigned ints and Change aligned=0 to aligned=False in records.py

Modified: trunk/numpy/core/records.py
===================================================================
--- trunk/numpy/core/records.py	2006-07-11 05:42:27 UTC (rev 2800)
+++ trunk/numpy/core/records.py	2006-07-11 16:04:38 UTC (rev 2801)
@@ -238,7 +238,7 @@
         return sb.ndarray.view(self, obj)            
     
 def fromarrays(arrayList, dtype=None, shape=None, formats=None,
-               names=None, titles=None, aligned=0, byteorder=None):
+               names=None, titles=None, aligned=False, byteorder=None):
     """ create a record array from a (flat) list of arrays
 
     >>> x1=array([1,2,3,4])
@@ -293,7 +293,7 @@
 
 # shape must be 1-d if you use list of lists...
 def fromrecords(recList, dtype=None, shape=None, formats=None, names=None,
-                titles=None, aligned=0, byteorder=None):
+                titles=None, aligned=False, byteorder=None):
     """ create a recarray from a list of records in text form
 
         The data in the same field can be heterogeneous, they will be promoted
@@ -359,7 +359,7 @@
 
 
 def fromstring(datastring, dtype=None, shape=None, offset=0, formats=None,
-               names=None, titles=None, byteorder=None, aligned=0):
+               names=None, titles=None, aligned=False, byteorder=None):
     """ create a (read-only) record array from binary data contained in
     a string"""
     
@@ -389,7 +389,7 @@
     return size
 
 def fromfile(fd, dtype=None, shape=None, offset=0, formats=None,
-             names=None, titles=None, byteorder=None, aligned=0):
+             names=None, titles=None, aligned=False, byteorder=None):
     """Create an array from binary file data
 
     If file is a string then that file is opened, else it is assumed
@@ -451,7 +451,7 @@
     return _array
 
 def array(obj, dtype=None, shape=None, offset=0, strides=None, formats=None,
-          names=None, titles=None, byteorder=None, aligned=0):
+          names=None, titles=None, aligned=False, byteorder=None):
     """Construct a record array from a wide-variety of objects.
     """
 

Modified: trunk/numpy/core/src/arrayobject.c
===================================================================
--- trunk/numpy/core/src/arrayobject.c	2006-07-11 05:42:27 UTC (rev 2800)
+++ trunk/numpy/core/src/arrayobject.c	2006-07-11 16:04:38 UTC (rev 2801)
@@ -8118,7 +8118,7 @@
 	case PyArray_LONGLONG:
 		if (PyTypeNum_ISINTEGER(totype)) {
 			if (PyTypeNum_ISUNSIGNED(totype)) {
-				return (telsize > felsize);
+				return 0;
 			}
 			else {
 				return (telsize >= felsize);




More information about the Numpy-svn mailing list