[Numpy-svn] r8113 - in trunk: doc doc/cython doc/numpybook doc/numpybook/comparison/pyrex doc/pyrex doc/source/reference numpy/core numpy/core/code_generators numpy/core/include/numpy numpy/core/src/multiarray numpy/random/mtrand
numpy-svn at scipy.org
numpy-svn at scipy.org
Mon Feb 15 18:13:16 EST 2010
Author: oliphant
Date: 2010-02-15 17:13:16 -0600 (Mon, 15 Feb 2010)
New Revision: 8113
Modified:
trunk/doc/CAPI.txt
trunk/doc/cython/c_numpy.pxd
trunk/doc/numpybook/capi.lyx
trunk/doc/numpybook/comparison/pyrex/c_numpy.pxd
trunk/doc/pyrex/c_numpy.pxd
trunk/doc/source/reference/c-api.types-and-structures.rst
trunk/numpy/core/code_generators/cversions.txt
trunk/numpy/core/code_generators/numpy_api.py
trunk/numpy/core/include/numpy/ndarrayobject.h
trunk/numpy/core/setup_common.py
trunk/numpy/core/src/multiarray/arraytypes.c.src
trunk/numpy/core/src/multiarray/descriptor.c
trunk/numpy/core/src/multiarray/hashdescr.c
trunk/numpy/core/src/multiarray/mapping.c
trunk/numpy/core/src/multiarray/multiarraymodule.c
trunk/numpy/random/mtrand/numpy.pxi
Log:
API and ABI changes: Removed BigArrayType, Fixed hasobject to an integer (and inserted an unused character for alignment) and renamed it to flags. Re-organized the ArrFuncs structure. Moved NPY_DATETIME and friends to their 'correct' place in the type order.
Modified: trunk/doc/CAPI.txt
===================================================================
--- trunk/doc/CAPI.txt 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/doc/CAPI.txt 2010-02-15 23:13:16 UTC (rev 8113)
@@ -61,9 +61,9 @@
``subtype`` : ``PyTypeObject *``
The subtype that should be created (either pass in
- ``&PyArray_Type``, ``&PyBigArray_Type``, or ``obj->ob_type``,
+ ``&PyArray_Type``, or ``obj->ob_type``,
where ``obj`` is a an instance of a subtype (or subclass) of
- ``PyArray_Type`` or ``PyBigArray_Type``).
+ ``PyArray_Type``).
``descr`` : ``PyArray_Descr *``
The type descriptor for the array. This is a Python object (this
@@ -114,7 +114,7 @@
order array. See below for an explanation of the flags.
``obj`` : ``PyObject *``
- If subtypes is ``&PyArray_Type`` or ``&PyBigArray_Type``, this argument is
+ If subtypes is ``&PyArray_Type``, this argument is
ignored. Otherwise, the ``__array_finalize__`` method of the subtype
is called (if present) and passed this object. This is usually an
array of the type to be created (so the ``__array_finalize__`` method
Modified: trunk/doc/cython/c_numpy.pxd
===================================================================
--- trunk/doc/cython/c_numpy.pxd 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/doc/cython/c_numpy.pxd 2010-02-15 23:13:16 UTC (rev 8113)
@@ -76,7 +76,8 @@
ctypedef extern class numpy.dtype [object PyArray_Descr]:
cdef int type_num, elsize, alignment
- cdef char type, kind, byteorder, hasobject
+ cdef char type, kind, byteorder
+ cdef int flags
cdef object fields, typeobj
ctypedef extern class numpy.ndarray [object PyArrayObject]:
Modified: trunk/doc/numpybook/capi.lyx
===================================================================
--- trunk/doc/numpybook/capi.lyx 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/doc/numpybook/capi.lyx 2010-02-15 23:13:16 UTC (rev 8113)
@@ -599,10 +599,18 @@
\emph on
char
\emph default
- hasobject;
+ unused;
\end_layout
\begin_layout LyX-Code
+
+\emph on
+int
+\emph default
+ flags;
+\end_layout
+
+\begin_layout LyX-Code
\emph on
int
@@ -674,9 +682,9 @@
\family default
flags should be set in the
\family typewriter
-hasobject
+flags
\family default
- flag.
+ member.
\end_layout
\begin_layout Description
@@ -702,7 +710,7 @@
\end_layout
\begin_layout Description
-hasobject A data-type bit-flag that determines if the data-type exhibits
+flags A data-type bit-flag that determines if the data-type exhibits
object-array like behavior.
Each bit in this member is a flag which are named as:
\end_layout
Modified: trunk/doc/numpybook/comparison/pyrex/c_numpy.pxd
===================================================================
--- trunk/doc/numpybook/comparison/pyrex/c_numpy.pxd 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/doc/numpybook/comparison/pyrex/c_numpy.pxd 2010-02-15 23:13:16 UTC (rev 8113)
@@ -73,7 +73,8 @@
ctypedef extern class numpy.dtype [object PyArray_Descr]:
cdef int type_num, elsize, alignment
- cdef char type, kind, byteorder, hasobject
+ cdef char type, kind, byteorder
+ cdef int flags
cdef object fields, typeobj
ctypedef extern class numpy.ndarray [object PyArrayObject]:
Modified: trunk/doc/pyrex/c_numpy.pxd
===================================================================
--- trunk/doc/pyrex/c_numpy.pxd 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/doc/pyrex/c_numpy.pxd 2010-02-15 23:13:16 UTC (rev 8113)
@@ -75,7 +75,8 @@
ctypedef extern class numpy.dtype [object PyArray_Descr]:
cdef int type_num, elsize, alignment
- cdef char type, kind, byteorder, hasobject
+ cdef char type, kind, byteorder
+ cdef int flags
cdef object fields, typeobj
ctypedef extern class numpy.ndarray [object PyArrayObject]:
Modified: trunk/doc/source/reference/c-api.types-and-structures.rst
===================================================================
--- trunk/doc/source/reference/c-api.types-and-structures.rst 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/doc/source/reference/c-api.types-and-structures.rst 2010-02-15 23:13:16 UTC (rev 8113)
@@ -191,7 +191,8 @@
char kind;
char type;
char byteorder;
- char hasobject;
+ char unused;
+ int flags;
int type_num;
int elsize;
int alignment;
@@ -208,7 +209,7 @@
should point to a user-defined typeobject. This typeobject can
either inherit from array scalars or not. If it does not inherit
from array scalars, then the :cdata:`NPY_USE_GETITEM` and
- :cdata:`NPY_USE_SETITEM` flags should be set in the ``hasobject`` flag.
+ :cdata:`NPY_USE_SETITEM` flags should be set in the ``flags`` member.
.. cmember:: char PyArray_Descr.kind
@@ -229,7 +230,7 @@
endian), '=' (native), '\|' (irrelevant, ignore). All builtin data-
types have byteorder '='.
-.. cmember:: char PyArray_Descr.hasobject
+.. cmember:: int PyArray_Descr.flags
A data-type bit-flag that determines if the data-type exhibits object-
array like behavior. Each bit in this member is a flag which are named
Modified: trunk/numpy/core/code_generators/cversions.txt
===================================================================
--- trunk/numpy/core/code_generators/cversions.txt 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/numpy/core/code_generators/cversions.txt 2010-02-15 23:13:16 UTC (rev 8113)
@@ -5,3 +5,4 @@
# Starting from here, the hash is defined from numpy_api.full_api dict
# version 4 added neighborhood iterators and PyArray_Correlate2
0x00000004 = 3d8940bf7b0d2a4e25be4338c14c3c85
+0x00000005 = 77e2e846db87f25d7cf99f9d812076f0
Modified: trunk/numpy/core/code_generators/numpy_api.py
===================================================================
--- trunk/numpy/core/code_generators/numpy_api.py 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/numpy/core/code_generators/numpy_api.py 2010-02-15 23:13:16 UTC (rev 8113)
@@ -13,7 +13,7 @@
"""
multiarray_global_vars = {
- 'NPY_NUMUSERTYPES': 7,
+ 'NPY_NUMUSERTYPES': 6,
}
multiarray_global_vars_types = {
@@ -21,239 +21,236 @@
}
multiarray_scalar_bool_values = {
- '_PyArrayScalar_BoolValues': 9
+ '_PyArrayScalar_BoolValues': 8
}
multiarray_types_api = {
- 'PyBigArray_Type': 1,
- 'PyArray_Type': 2,
- 'PyArrayDescr_Type': 3,
- 'PyArrayFlags_Type': 4,
- 'PyArrayIter_Type': 5,
- 'PyArrayMultiIter_Type': 6,
- 'PyBoolArrType_Type': 8,
- 'PyGenericArrType_Type': 10,
- 'PyNumberArrType_Type': 11,
- 'PyIntegerArrType_Type': 12,
- 'PySignedIntegerArrType_Type': 13,
- 'PyUnsignedIntegerArrType_Type': 14,
- 'PyInexactArrType_Type': 15,
- 'PyFloatingArrType_Type': 16,
- 'PyComplexFloatingArrType_Type': 17,
- 'PyFlexibleArrType_Type': 18,
- 'PyCharacterArrType_Type': 19,
- 'PyByteArrType_Type': 20,
- 'PyShortArrType_Type': 21,
- 'PyIntArrType_Type': 22,
- 'PyLongArrType_Type': 23,
- 'PyLongLongArrType_Type': 24,
- 'PyUByteArrType_Type': 25,
- 'PyUShortArrType_Type': 26,
- 'PyUIntArrType_Type': 27,
- 'PyULongArrType_Type': 28,
- 'PyULongLongArrType_Type': 29,
- 'PyFloatArrType_Type': 30,
- 'PyDoubleArrType_Type': 31,
- 'PyLongDoubleArrType_Type': 32,
- 'PyCFloatArrType_Type': 33,
- 'PyCDoubleArrType_Type': 34,
- 'PyCLongDoubleArrType_Type': 35,
- 'PyObjectArrType_Type': 36,
- 'PyStringArrType_Type': 37,
- 'PyUnicodeArrType_Type': 38,
- 'PyVoidArrType_Type': 39,
-# Those were added much later, and there is no space anymore between Void and
-# first functions from multiarray API
- 'PyTimeIntegerArrType_Type': 215,
- 'PyDatetimeArrType_Type': 216,
- 'PyTimedeltaArrType_Type': 217,
+ 'PyArray_Type': 1,
+ 'PyArrayDescr_Type': 2,
+ 'PyArrayFlags_Type': 3,
+ 'PyArrayIter_Type': 4,
+ 'PyArrayMultiIter_Type': 5,
+ 'PyBoolArrType_Type': 7,
+ 'PyGenericArrType_Type': 9,
+ 'PyNumberArrType_Type': 10,
+ 'PyIntegerArrType_Type': 11,
+ 'PySignedIntegerArrType_Type': 12,
+ 'PyUnsignedIntegerArrType_Type': 13,
+ 'PyInexactArrType_Type': 14,
+ 'PyFloatingArrType_Type': 15,
+ 'PyComplexFloatingArrType_Type': 16,
+ 'PyFlexibleArrType_Type': 17,
+ 'PyCharacterArrType_Type': 18,
+ 'PyByteArrType_Type': 19,
+ 'PyShortArrType_Type': 20,
+ 'PyIntArrType_Type': 21,
+ 'PyLongArrType_Type': 22,
+ 'PyLongLongArrType_Type': 23,
+ 'PyUByteArrType_Type': 24,
+ 'PyUShortArrType_Type': 25,
+ 'PyUIntArrType_Type': 26,
+ 'PyULongArrType_Type': 27,
+ 'PyULongLongArrType_Type': 28,
+ 'PyFloatArrType_Type': 29,
+ 'PyDoubleArrType_Type': 30,
+ 'PyLongDoubleArrType_Type': 31,
+ 'PyCFloatArrType_Type': 32,
+ 'PyCDoubleArrType_Type': 33,
+ 'PyCLongDoubleArrType_Type': 34,
+ 'PyObjectArrType_Type': 35,
+ 'PyStringArrType_Type': 36,
+ 'PyUnicodeArrType_Type': 37,
+ 'PyVoidArrType_Type': 38,
+ 'PyTimeIntegerArrType_Type': 39,
+ 'PyDatetimeArrType_Type': 40,
+ 'PyTimedeltaArrType_Type': 41,
}
-#define NPY_NUMUSERTYPES (*(int *)PyArray_API[7])
-#define PyBoolArrType_Type (*(PyTypeObject *)PyArray_API[8])
-#define _PyArrayScalar_BoolValues ((PyBoolScalarObject *)PyArray_API[9])
+#define NPY_NUMUSERTYPES (*(int *)PyArray_API[6])
+#define PyBoolArrType_Type (*(PyTypeObject *)PyArray_API[7])
+#define _PyArrayScalar_BoolValues ((PyBoolScalarObject *)PyArray_API[8])
multiarray_funcs_api = {
'PyArray_GetNDArrayCVersion': 0,
- 'PyArray_SetNumericOps': 40,
- 'PyArray_GetNumericOps': 41,
- 'PyArray_INCREF': 42,
- 'PyArray_XDECREF': 43,
- 'PyArray_SetStringFunction': 44,
- 'PyArray_DescrFromType': 45,
- 'PyArray_TypeObjectFromType': 46,
- 'PyArray_Zero': 47,
- 'PyArray_One': 48,
- 'PyArray_CastToType': 49,
- 'PyArray_CastTo': 50,
- 'PyArray_CastAnyTo': 51,
- 'PyArray_CanCastSafely': 52,
- 'PyArray_CanCastTo': 53,
- 'PyArray_ObjectType': 54,
- 'PyArray_DescrFromObject': 55,
- 'PyArray_ConvertToCommonType': 56,
- 'PyArray_DescrFromScalar': 57,
- 'PyArray_DescrFromTypeObject': 58,
- 'PyArray_Size': 59,
- 'PyArray_Scalar': 60,
- 'PyArray_FromScalar': 61,
- 'PyArray_ScalarAsCtype': 62,
- 'PyArray_CastScalarToCtype': 63,
- 'PyArray_CastScalarDirect': 64,
- 'PyArray_ScalarFromObject': 65,
- 'PyArray_GetCastFunc': 66,
- 'PyArray_FromDims': 67,
- 'PyArray_FromDimsAndDataAndDescr': 68,
- 'PyArray_FromAny': 69,
- 'PyArray_EnsureArray': 70,
- 'PyArray_EnsureAnyArray': 71,
- 'PyArray_FromFile': 72,
- 'PyArray_FromString': 73,
- 'PyArray_FromBuffer': 74,
- 'PyArray_FromIter': 75,
- 'PyArray_Return': 76,
- 'PyArray_GetField': 77,
- 'PyArray_SetField': 78,
- 'PyArray_Byteswap': 79,
- 'PyArray_Resize': 80,
- 'PyArray_MoveInto': 81,
- 'PyArray_CopyInto': 82,
- 'PyArray_CopyAnyInto': 83,
- 'PyArray_CopyObject': 84,
- 'PyArray_NewCopy': 85,
- 'PyArray_ToList': 86,
- 'PyArray_ToString': 87,
- 'PyArray_ToFile': 88,
- 'PyArray_Dump': 89,
- 'PyArray_Dumps': 90,
- 'PyArray_ValidType': 91,
- 'PyArray_UpdateFlags': 92,
- 'PyArray_New': 93,
- 'PyArray_NewFromDescr': 94,
- 'PyArray_DescrNew': 95,
- 'PyArray_DescrNewFromType': 96,
- 'PyArray_GetPriority': 97,
- 'PyArray_IterNew': 98,
- 'PyArray_MultiIterNew': 99,
- 'PyArray_PyIntAsInt': 100,
- 'PyArray_PyIntAsIntp': 101,
- 'PyArray_Broadcast': 102,
- 'PyArray_FillObjectArray': 103,
- 'PyArray_FillWithScalar': 104,
- 'PyArray_CheckStrides': 105,
- 'PyArray_DescrNewByteorder': 106,
- 'PyArray_IterAllButAxis': 107,
- 'PyArray_CheckFromAny': 108,
- 'PyArray_FromArray': 109,
- 'PyArray_FromInterface': 110,
- 'PyArray_FromStructInterface': 111,
- 'PyArray_FromArrayAttr': 112,
- 'PyArray_ScalarKind': 113,
- 'PyArray_CanCoerceScalar': 114,
- 'PyArray_NewFlagsObject': 115,
- 'PyArray_CanCastScalar': 116,
- 'PyArray_CompareUCS4': 117,
- 'PyArray_RemoveSmallest': 118,
- 'PyArray_ElementStrides': 119,
- 'PyArray_Item_INCREF': 120,
- 'PyArray_Item_XDECREF': 121,
- 'PyArray_FieldNames': 122,
- 'PyArray_Transpose': 123,
- 'PyArray_TakeFrom': 124,
- 'PyArray_PutTo': 125,
- 'PyArray_PutMask': 126,
- 'PyArray_Repeat': 127,
- 'PyArray_Choose': 128,
- 'PyArray_Sort': 129,
- 'PyArray_ArgSort': 130,
- 'PyArray_SearchSorted': 131,
- 'PyArray_ArgMax': 132,
- 'PyArray_ArgMin': 133,
- 'PyArray_Reshape': 134,
- 'PyArray_Newshape': 135,
- 'PyArray_Squeeze': 136,
- 'PyArray_View': 137,
- 'PyArray_SwapAxes': 138,
- 'PyArray_Max': 139,
- 'PyArray_Min': 140,
- 'PyArray_Ptp': 141,
- 'PyArray_Mean': 142,
- 'PyArray_Trace': 143,
- 'PyArray_Diagonal': 144,
- 'PyArray_Clip': 145,
- 'PyArray_Conjugate': 146,
- 'PyArray_Nonzero': 147,
- 'PyArray_Std': 148,
- 'PyArray_Sum': 149,
- 'PyArray_CumSum': 150,
- 'PyArray_Prod': 151,
- 'PyArray_CumProd': 152,
- 'PyArray_All': 153,
- 'PyArray_Any': 154,
- 'PyArray_Compress': 155,
- 'PyArray_Flatten': 156,
- 'PyArray_Ravel': 157,
- 'PyArray_MultiplyList': 158,
- 'PyArray_MultiplyIntList': 159,
- 'PyArray_GetPtr': 160,
- 'PyArray_CompareLists': 161,
- 'PyArray_AsCArray': 162,
- 'PyArray_As1D': 163,
- 'PyArray_As2D': 164,
- 'PyArray_Free': 165,
- 'PyArray_Converter': 166,
- 'PyArray_IntpFromSequence': 167,
- 'PyArray_Concatenate': 168,
- 'PyArray_InnerProduct': 169,
- 'PyArray_MatrixProduct': 170,
- 'PyArray_CopyAndTranspose': 171,
- 'PyArray_Correlate': 172,
- 'PyArray_TypestrConvert': 173,
- 'PyArray_DescrConverter': 174,
- 'PyArray_DescrConverter2': 175,
- 'PyArray_IntpConverter': 176,
- 'PyArray_BufferConverter': 177,
- 'PyArray_AxisConverter': 178,
- 'PyArray_BoolConverter': 179,
- 'PyArray_ByteorderConverter': 180,
- 'PyArray_OrderConverter': 181,
- 'PyArray_EquivTypes': 182,
- 'PyArray_Zeros': 183,
- 'PyArray_Empty': 184,
- 'PyArray_Where': 185,
- 'PyArray_Arange': 186,
- 'PyArray_ArangeObj': 187,
- 'PyArray_SortkindConverter': 188,
- 'PyArray_LexSort': 189,
- 'PyArray_Round': 190,
- 'PyArray_EquivTypenums': 191,
- 'PyArray_RegisterDataType': 192,
- 'PyArray_RegisterCastFunc': 193,
- 'PyArray_RegisterCanCast': 194,
- 'PyArray_InitArrFuncs': 195,
- 'PyArray_IntTupleFromIntp': 196,
- 'PyArray_TypeNumFromName': 197,
- 'PyArray_ClipmodeConverter': 198,
- 'PyArray_OutputConverter': 199,
- 'PyArray_BroadcastToShape': 200,
- '_PyArray_SigintHandler': 201,
- '_PyArray_GetSigintBuf': 202,
- 'PyArray_DescrAlignConverter': 203,
- 'PyArray_DescrAlignConverter2': 204,
- 'PyArray_SearchsideConverter': 205,
- 'PyArray_CheckAxis': 206,
- 'PyArray_OverflowMultiplyList': 207,
- 'PyArray_CompareString': 208,
- 'PyArray_MultiIterFromObjects': 209,
- 'PyArray_GetEndianness': 210,
- 'PyArray_GetNDArrayCFeatureVersion': 211,
- 'PyArray_Correlate2': 212,
- 'PyArray_NeighborhoodIterNew': 213,
- 'PyArray_SetDatetimeParseFunction': 214,
- 'PyArray_DatetimeToDatetimeStruct': 218,
- 'PyArray_TimedeltaToTimedeltaStruct': 219,
- 'PyArray_DatetimeStructToDatetime': 220,
- 'PyArray_TimedeltaStructToTimedelta': 221,
+ 'PyArray_SetNumericOps': 42,
+ 'PyArray_GetNumericOps': 43,
+ 'PyArray_INCREF': 44,
+ 'PyArray_XDECREF': 45,
+ 'PyArray_SetStringFunction': 46,
+ 'PyArray_DescrFromType': 47,
+ 'PyArray_TypeObjectFromType': 48,
+ 'PyArray_Zero': 49,
+ 'PyArray_One': 50,
+ 'PyArray_CastToType': 51,
+ 'PyArray_CastTo': 52,
+ 'PyArray_CastAnyTo': 53,
+ 'PyArray_CanCastSafely': 54,
+ 'PyArray_CanCastTo': 55,
+ 'PyArray_ObjectType': 56,
+ 'PyArray_DescrFromObject': 57,
+ 'PyArray_ConvertToCommonType': 58,
+ 'PyArray_DescrFromScalar': 59,
+ 'PyArray_DescrFromTypeObject': 60,
+ 'PyArray_Size': 61,
+ 'PyArray_Scalar': 62,
+ 'PyArray_FromScalar': 63,
+ 'PyArray_ScalarAsCtype': 64,
+ 'PyArray_CastScalarToCtype': 65,
+ 'PyArray_CastScalarDirect': 66,
+ 'PyArray_ScalarFromObject': 67,
+ 'PyArray_GetCastFunc': 68,
+ 'PyArray_FromDims': 69,
+ 'PyArray_FromDimsAndDataAndDescr': 70,
+ 'PyArray_FromAny': 71,
+ 'PyArray_EnsureArray': 72,
+ 'PyArray_EnsureAnyArray': 73,
+ 'PyArray_FromFile': 74,
+ 'PyArray_FromString': 75,
+ 'PyArray_FromBuffer': 76,
+ 'PyArray_FromIter': 77,
+ 'PyArray_Return': 78,
+ 'PyArray_GetField': 79,
+ 'PyArray_SetField': 80,
+ 'PyArray_Byteswap': 81,
+ 'PyArray_Resize': 82,
+ 'PyArray_MoveInto': 83,
+ 'PyArray_CopyInto': 84,
+ 'PyArray_CopyAnyInto': 85,
+ 'PyArray_CopyObject': 86,
+ 'PyArray_NewCopy': 87,
+ 'PyArray_ToList': 88,
+ 'PyArray_ToString': 89,
+ 'PyArray_ToFile': 90,
+ 'PyArray_Dump': 91,
+ 'PyArray_Dumps': 92,
+ 'PyArray_ValidType': 93,
+ 'PyArray_UpdateFlags': 94,
+ 'PyArray_New': 95,
+ 'PyArray_NewFromDescr': 96,
+ 'PyArray_DescrNew': 97,
+ 'PyArray_DescrNewFromType': 98,
+ 'PyArray_GetPriority': 99,
+ 'PyArray_IterNew': 100,
+ 'PyArray_MultiIterNew': 101,
+ 'PyArray_PyIntAsInt': 102,
+ 'PyArray_PyIntAsIntp': 103,
+ 'PyArray_Broadcast': 104,
+ 'PyArray_FillObjectArray': 105,
+ 'PyArray_FillWithScalar': 106,
+ 'PyArray_CheckStrides': 107,
+ 'PyArray_DescrNewByteorder': 108,
+ 'PyArray_IterAllButAxis': 109,
+ 'PyArray_CheckFromAny': 110,
+ 'PyArray_FromArray': 111,
+ 'PyArray_FromInterface': 112,
+ 'PyArray_FromStructInterface': 113,
+ 'PyArray_FromArrayAttr': 114,
+ 'PyArray_ScalarKind': 115,
+ 'PyArray_CanCoerceScalar': 116,
+ 'PyArray_NewFlagsObject': 117,
+ 'PyArray_CanCastScalar': 118,
+ 'PyArray_CompareUCS4': 119,
+ 'PyArray_RemoveSmallest': 120,
+ 'PyArray_ElementStrides': 121,
+ 'PyArray_Item_INCREF': 122,
+ 'PyArray_Item_XDECREF': 123,
+ 'PyArray_FieldNames': 124,
+ 'PyArray_Transpose': 125,
+ 'PyArray_TakeFrom': 126,
+ 'PyArray_PutTo': 127,
+ 'PyArray_PutMask': 128,
+ 'PyArray_Repeat': 129,
+ 'PyArray_Choose': 130,
+ 'PyArray_Sort': 131,
+ 'PyArray_ArgSort': 132,
+ 'PyArray_SearchSorted': 133,
+ 'PyArray_ArgMax': 134,
+ 'PyArray_ArgMin': 135,
+ 'PyArray_Reshape': 136,
+ 'PyArray_Newshape': 137,
+ 'PyArray_Squeeze': 138,
+ 'PyArray_View': 139,
+ 'PyArray_SwapAxes': 140,
+ 'PyArray_Max': 141,
+ 'PyArray_Min': 142,
+ 'PyArray_Ptp': 143,
+ 'PyArray_Mean': 144,
+ 'PyArray_Trace': 145,
+ 'PyArray_Diagonal': 146,
+ 'PyArray_Clip': 147,
+ 'PyArray_Conjugate': 148,
+ 'PyArray_Nonzero': 149,
+ 'PyArray_Std': 150,
+ 'PyArray_Sum': 151,
+ 'PyArray_CumSum': 152,
+ 'PyArray_Prod': 153,
+ 'PyArray_CumProd': 154,
+ 'PyArray_All': 155,
+ 'PyArray_Any': 156,
+ 'PyArray_Compress': 157,
+ 'PyArray_Flatten': 158,
+ 'PyArray_Ravel': 159,
+ 'PyArray_MultiplyList': 160,
+ 'PyArray_MultiplyIntList': 161,
+ 'PyArray_GetPtr': 162,
+ 'PyArray_CompareLists': 163,
+ 'PyArray_AsCArray': 164,
+ 'PyArray_As1D': 165,
+ 'PyArray_As2D': 166,
+ 'PyArray_Free': 167,
+ 'PyArray_Converter': 168,
+ 'PyArray_IntpFromSequence': 169,
+ 'PyArray_Concatenate': 170,
+ 'PyArray_InnerProduct': 171,
+ 'PyArray_MatrixProduct': 172,
+ 'PyArray_CopyAndTranspose': 173,
+ 'PyArray_Correlate': 174,
+ 'PyArray_TypestrConvert': 175,
+ 'PyArray_DescrConverter': 176,
+ 'PyArray_DescrConverter2': 177,
+ 'PyArray_IntpConverter': 178,
+ 'PyArray_BufferConverter': 179,
+ 'PyArray_AxisConverter': 180,
+ 'PyArray_BoolConverter': 181,
+ 'PyArray_ByteorderConverter': 182,
+ 'PyArray_OrderConverter': 183,
+ 'PyArray_EquivTypes': 184,
+ 'PyArray_Zeros': 185,
+ 'PyArray_Empty': 186,
+ 'PyArray_Where': 187,
+ 'PyArray_Arange': 188,
+ 'PyArray_ArangeObj': 189,
+ 'PyArray_SortkindConverter': 190,
+ 'PyArray_LexSort': 191,
+ 'PyArray_Round': 192,
+ 'PyArray_EquivTypenums': 193,
+ 'PyArray_RegisterDataType': 194,
+ 'PyArray_RegisterCastFunc': 195,
+ 'PyArray_RegisterCanCast': 196,
+ 'PyArray_InitArrFuncs': 197,
+ 'PyArray_IntTupleFromIntp': 198,
+ 'PyArray_TypeNumFromName': 199,
+ 'PyArray_ClipmodeConverter': 200,
+ 'PyArray_OutputConverter': 201,
+ 'PyArray_BroadcastToShape': 202,
+ '_PyArray_SigintHandler': 203,
+ '_PyArray_GetSigintBuf': 204,
+ 'PyArray_DescrAlignConverter': 205,
+ 'PyArray_DescrAlignConverter2': 206,
+ 'PyArray_SearchsideConverter': 207,
+ 'PyArray_CheckAxis': 208,
+ 'PyArray_OverflowMultiplyList': 209,
+ 'PyArray_CompareString': 210,
+ 'PyArray_MultiIterFromObjects': 211,
+ 'PyArray_GetEndianness': 212,
+ 'PyArray_GetNDArrayCFeatureVersion': 213,
+ 'PyArray_Correlate2': 214,
+ 'PyArray_NeighborhoodIterNew': 215,
+ 'PyArray_SetDatetimeParseFunction': 216,
+ 'PyArray_DatetimeToDatetimeStruct': 217,
+ 'PyArray_TimedeltaToTimedeltaStruct': 218,
+ 'PyArray_DatetimeStructToDatetime': 219,
+ 'PyArray_TimedeltaStructToTimedelta': 220,
}
ufunc_types_api = {
Modified: trunk/numpy/core/include/numpy/ndarrayobject.h
===================================================================
--- trunk/numpy/core/include/numpy/ndarrayobject.h 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/numpy/core/include/numpy/ndarrayobject.h 2010-02-15 23:13:16 UTC (rev 8113)
@@ -75,10 +75,10 @@
NPY_LONGLONG, NPY_ULONGLONG,
NPY_FLOAT, NPY_DOUBLE, NPY_LONGDOUBLE,
NPY_CFLOAT, NPY_CDOUBLE, NPY_CLONGDOUBLE,
- NPY_OBJECT=17,
+ NPY_DATETIME, NPY_TIMEDELTA,
+ NPY_OBJECT=19,
NPY_STRING, NPY_UNICODE,
NPY_VOID,
- NPY_DATETIME, NPY_TIMEDELTA,
NPY_NTYPES,
NPY_NOTYPE,
NPY_CHAR, /* special flag */
@@ -381,10 +381,6 @@
} PyArray_Dims;
typedef struct {
- /* Functions to cast to all other standard types*/
- /* Can have some NULL entries */
- PyArray_VectorUnaryFunc *cast[NPY_NTYPES];
-
/* The next four functions *cannot* be NULL */
/* Functions to get and set items with standard
@@ -453,6 +449,17 @@
PyArray_FastClipFunc *fastclip;
PyArray_FastPutmaskFunc *fastputmask;
PyArray_FastTakeFunc *fasttake;
+
+ /* A little room to grow --- should use generic function interface for most additions */
+ void *pad1;
+ void *pad2;
+ void *pad3;
+ void *pad4;
+
+ /* Functions to cast to all other standard types*/
+ /* Can have some NULL entries */
+ PyArray_VectorUnaryFunc *cast[NPY_NTYPES];
+
} PyArray_ArrFuncs;
/* The item must be reference counted when it is inserted or extracted. */
@@ -483,12 +490,11 @@
NPY_NEEDS_INIT | NPY_NEEDS_PYAPI)
#define PyDataType_FLAGCHK(dtype, flag) \
- (((dtype)->hasobject & (flag)) == (flag))
+ (((dtype)->flags & (flag)) == (flag))
#define PyDataType_REFCHK(dtype) \
PyDataType_FLAGCHK(dtype, NPY_ITEM_REFCOUNT)
-/* Change dtype hasobject to 32-bit in 1.1 and change its name */
typedef struct _PyArray_Descr {
PyObject_HEAD
PyTypeObject *typeobj; /* the type object representing an
@@ -499,9 +505,9 @@
char type; /* unique-character representing this type */
char byteorder; /* '>' (big), '<' (little), '|'
(not-applicable), or '=' (native). */
- char hasobject; /* non-zero if it has object arrays
- in fields */
- int type_num; /* number representing this type */
+ char unused;
+ int flags; /* flag describing data type */
+ int type_num; /* number representing this type */
int elsize; /* element size for this type */
int alignment; /* alignment needed for this type */
struct _arr_descr \
Modified: trunk/numpy/core/setup_common.py
===================================================================
--- trunk/numpy/core/setup_common.py 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/numpy/core/setup_common.py 2010-02-15 23:13:16 UTC (rev 8113)
@@ -21,7 +21,7 @@
# Binary compatibility version number. This number is increased whenever the
# C-API is changed such that binary compatibility is broken, i.e. whenever a
# recompile of extension modules is needed.
-C_ABI_VERSION = 0x01000009
+C_ABI_VERSION = 0x02000000
# Minor API version. This number is increased whenever a change is made to the
# C-API -- whether it breaks binary compatibility or not. Some changes, such
@@ -29,7 +29,7 @@
# without breaking binary compatibility. In this case, only the C_API_VERSION
# (*not* C_ABI_VERSION) would be increased. Whenever binary compatibility is
# broken, both C_API_VERSION and C_ABI_VERSION should be increased.
-C_API_VERSION = 0x00000004
+C_API_VERSION = 0x00000005
class MismatchCAPIWarning(Warning):
pass
Modified: trunk/numpy/core/src/multiarray/arraytypes.c.src
===================================================================
--- trunk/numpy/core/src/multiarray/arraytypes.c.src 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/numpy/core/src/multiarray/arraytypes.c.src 2010-02-15 23:13:16 UTC (rev 8113)
@@ -3312,31 +3312,6 @@
* #endian = |, |, =#
*/
static PyArray_ArrFuncs _Py at NAME@_ArrFuncs = {
- {
- (PyArray_VectorUnaryFunc*)@from at _to_BOOL,
- (PyArray_VectorUnaryFunc*)@from at _to_BYTE,
- (PyArray_VectorUnaryFunc*)@from at _to_UBYTE,
- (PyArray_VectorUnaryFunc*)@from at _to_SHORT,
- (PyArray_VectorUnaryFunc*)@from at _to_USHORT,
- (PyArray_VectorUnaryFunc*)@from at _to_INT,
- (PyArray_VectorUnaryFunc*)@from at _to_UINT,
- (PyArray_VectorUnaryFunc*)@from at _to_LONG,
- (PyArray_VectorUnaryFunc*)@from at _to_ULONG,
- (PyArray_VectorUnaryFunc*)@from at _to_LONGLONG,
- (PyArray_VectorUnaryFunc*)@from at _to_ULONGLONG,
- (PyArray_VectorUnaryFunc*)@from at _to_FLOAT,
- (PyArray_VectorUnaryFunc*)@from at _to_DOUBLE,
- (PyArray_VectorUnaryFunc*)@from at _to_LONGDOUBLE,
- (PyArray_VectorUnaryFunc*)@from at _to_CFLOAT,
- (PyArray_VectorUnaryFunc*)@from at _to_CDOUBLE,
- (PyArray_VectorUnaryFunc*)@from at _to_CLONGDOUBLE,
- (PyArray_VectorUnaryFunc*)@from at _to_OBJECT,
- (PyArray_VectorUnaryFunc*)@from at _to_STRING,
- (PyArray_VectorUnaryFunc*)@from at _to_UNICODE,
- (PyArray_VectorUnaryFunc*)@from at _to_VOID,
- (PyArray_VectorUnaryFunc*)@from at _to_DATETIME,
- (PyArray_VectorUnaryFunc*)@from at _to_TIMEDELTA
- },
(PyArray_GetItemFunc*)@from at _getitem,
(PyArray_SetItemFunc*)@from at _setitem,
(PyArray_CopySwapNFunc*)@from at _copyswapn,
@@ -3361,7 +3336,33 @@
NULL,
(PyArray_FastClipFunc *)NULL,
(PyArray_FastPutmaskFunc *)NULL,
- (PyArray_FastTakeFunc *)NULL
+ (PyArray_FastTakeFunc *)NULL,
+ NULL, NULL, NULL, NULL,
+ {
+ (PyArray_VectorUnaryFunc*)@from at _to_BOOL,
+ (PyArray_VectorUnaryFunc*)@from at _to_BYTE,
+ (PyArray_VectorUnaryFunc*)@from at _to_UBYTE,
+ (PyArray_VectorUnaryFunc*)@from at _to_SHORT,
+ (PyArray_VectorUnaryFunc*)@from at _to_USHORT,
+ (PyArray_VectorUnaryFunc*)@from at _to_INT,
+ (PyArray_VectorUnaryFunc*)@from at _to_UINT,
+ (PyArray_VectorUnaryFunc*)@from at _to_LONG,
+ (PyArray_VectorUnaryFunc*)@from at _to_ULONG,
+ (PyArray_VectorUnaryFunc*)@from at _to_LONGLONG,
+ (PyArray_VectorUnaryFunc*)@from at _to_ULONGLONG,
+ (PyArray_VectorUnaryFunc*)@from at _to_FLOAT,
+ (PyArray_VectorUnaryFunc*)@from at _to_DOUBLE,
+ (PyArray_VectorUnaryFunc*)@from at _to_LONGDOUBLE,
+ (PyArray_VectorUnaryFunc*)@from at _to_CFLOAT,
+ (PyArray_VectorUnaryFunc*)@from at _to_CDOUBLE,
+ (PyArray_VectorUnaryFunc*)@from at _to_CLONGDOUBLE,
+ (PyArray_VectorUnaryFunc*)@from at _to_DATETIME,
+ (PyArray_VectorUnaryFunc*)@from at _to_TIMEDELTA,
+ (PyArray_VectorUnaryFunc*)@from at _to_OBJECT,
+ (PyArray_VectorUnaryFunc*)@from at _to_STRING,
+ (PyArray_VectorUnaryFunc*)@from at _to_UNICODE,
+ (PyArray_VectorUnaryFunc*)@from at _to_VOID
+ }
};
/*
@@ -3374,6 +3375,7 @@
PyArray_ at from@LTR,
'@endian@',
0,
+ 0,
PyArray_ at from@,
0,
_ALIGN(@align@),
@@ -3406,31 +3408,6 @@
* #isobject= 0*17,NPY_OBJECT_DTYPE_FLAGS,0*2#
*/
static PyArray_ArrFuncs _Py at NAME@_ArrFuncs = {
- {
- (PyArray_VectorUnaryFunc*)@from at _to_BOOL,
- (PyArray_VectorUnaryFunc*)@from at _to_BYTE,
- (PyArray_VectorUnaryFunc*)@from at _to_UBYTE,
- (PyArray_VectorUnaryFunc*)@from at _to_SHORT,
- (PyArray_VectorUnaryFunc*)@from at _to_USHORT,
- (PyArray_VectorUnaryFunc*)@from at _to_INT,
- (PyArray_VectorUnaryFunc*)@from at _to_UINT,
- (PyArray_VectorUnaryFunc*)@from at _to_LONG,
- (PyArray_VectorUnaryFunc*)@from at _to_ULONG,
- (PyArray_VectorUnaryFunc*)@from at _to_LONGLONG,
- (PyArray_VectorUnaryFunc*)@from at _to_ULONGLONG,
- (PyArray_VectorUnaryFunc*)@from at _to_FLOAT,
- (PyArray_VectorUnaryFunc*)@from at _to_DOUBLE,
- (PyArray_VectorUnaryFunc*)@from at _to_LONGDOUBLE,
- (PyArray_VectorUnaryFunc*)@from at _to_CFLOAT,
- (PyArray_VectorUnaryFunc*)@from at _to_CDOUBLE,
- (PyArray_VectorUnaryFunc*)@from at _to_CLONGDOUBLE,
- (PyArray_VectorUnaryFunc*)@from at _to_OBJECT,
- (PyArray_VectorUnaryFunc*)@from at _to_STRING,
- (PyArray_VectorUnaryFunc*)@from at _to_UNICODE,
- (PyArray_VectorUnaryFunc*)@from at _to_VOID,
- (PyArray_VectorUnaryFunc*)@from at _to_DATETIME,
- (PyArray_VectorUnaryFunc*)@from at _to_TIMEDELTA
- },
(PyArray_GetItemFunc*)@from at _getitem,
(PyArray_SetItemFunc*)@from at _setitem,
(PyArray_CopySwapNFunc*)@from at _copyswapn,
@@ -3455,7 +3432,33 @@
NULL,
(PyArray_FastClipFunc*)@from at _fastclip,
(PyArray_FastPutmaskFunc*)@from at _fastputmask,
- (PyArray_FastTakeFunc*)@from at _fasttake
+ (PyArray_FastTakeFunc*)@from at _fasttake,
+ NULL, NULL, NULL, NULL,
+ {
+ (PyArray_VectorUnaryFunc*)@from at _to_BOOL,
+ (PyArray_VectorUnaryFunc*)@from at _to_BYTE,
+ (PyArray_VectorUnaryFunc*)@from at _to_UBYTE,
+ (PyArray_VectorUnaryFunc*)@from at _to_SHORT,
+ (PyArray_VectorUnaryFunc*)@from at _to_USHORT,
+ (PyArray_VectorUnaryFunc*)@from at _to_INT,
+ (PyArray_VectorUnaryFunc*)@from at _to_UINT,
+ (PyArray_VectorUnaryFunc*)@from at _to_LONG,
+ (PyArray_VectorUnaryFunc*)@from at _to_ULONG,
+ (PyArray_VectorUnaryFunc*)@from at _to_LONGLONG,
+ (PyArray_VectorUnaryFunc*)@from at _to_ULONGLONG,
+ (PyArray_VectorUnaryFunc*)@from at _to_FLOAT,
+ (PyArray_VectorUnaryFunc*)@from at _to_DOUBLE,
+ (PyArray_VectorUnaryFunc*)@from at _to_LONGDOUBLE,
+ (PyArray_VectorUnaryFunc*)@from at _to_CFLOAT,
+ (PyArray_VectorUnaryFunc*)@from at _to_CDOUBLE,
+ (PyArray_VectorUnaryFunc*)@from at _to_CLONGDOUBLE,
+ (PyArray_VectorUnaryFunc*)@from at _to_OBJECT,
+ (PyArray_VectorUnaryFunc*)@from at _to_DATETIME,
+ (PyArray_VectorUnaryFunc*)@from at _to_TIMEDELTA,
+ (PyArray_VectorUnaryFunc*)@from at _to_STRING,
+ (PyArray_VectorUnaryFunc*)@from at _to_UNICODE,
+ (PyArray_VectorUnaryFunc*)@from at _to_VOID
+ }
};
/*
@@ -3467,6 +3470,7 @@
PyArray_ at kind@LTR,
PyArray_ at from@LTR,
'@endian@',
+ 0,
@isobject@,
PyArray_ at from@,
@num@*sizeof(@fromtyp@),
@@ -3520,12 +3524,12 @@
&CFLOAT_Descr,
&CDOUBLE_Descr,
&CLONGDOUBLE_Descr,
+ &DATETIME_Descr,
+ &TIMEDELTA_Descr,
&OBJECT_Descr,
&STRING_Descr,
&UNICODE_Descr,
&VOID_Descr,
- &DATETIME_Descr,
- &TIMEDELTA_Descr,
};
/*NUMPY_API
Modified: trunk/numpy/core/src/multiarray/descriptor.c
===================================================================
--- trunk/numpy/core/src/multiarray/descriptor.c 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/numpy/core/src/multiarray/descriptor.c 2010-02-15 23:13:16 UTC (rev 8113)
@@ -231,7 +231,7 @@
PyDimMem_FREE(shape.ptr);
newdescr->subarray = _pya_malloc(sizeof(PyArray_ArrayDescr));
newdescr->subarray->base = type;
- newdescr->hasobject = type->hasobject;
+ newdescr->flags = type->flags;
Py_INCREF(val);
newdescr->subarray->shape = val;
Py_XDECREF(newdescr->fields);
@@ -356,7 +356,7 @@
"two fields with the same name");
goto fail;
}
- dtypeflags |= (conv->hasobject & NPY_FROM_FIELDS);
+ dtypeflags |= (conv->flags & NPY_FROM_FIELDS);
tup = PyTuple_New((title == NULL ? 2 : 3));
PyTuple_SET_ITEM(tup, 0, (PyObject *)conv);
if (align) {
@@ -402,7 +402,7 @@
new->fields = fields;
new->names = nameslist;
new->elsize = totalsize;
- new->hasobject=dtypeflags;
+ new->flags=dtypeflags;
if (maxalign > 1) {
totalsize = ((totalsize+maxalign-1)/maxalign)*maxalign;
}
@@ -465,7 +465,7 @@
Py_DECREF(key);
goto fail;
}
- dtypeflags |= (conv->hasobject & NPY_FROM_FIELDS);
+ dtypeflags |= (conv->flags & NPY_FROM_FIELDS);
PyTuple_SET_ITEM(tup, 0, (PyObject *)conv);
if (align) {
int _align;
@@ -485,7 +485,7 @@
new = PyArray_DescrNewFromType(PyArray_VOID);
new->fields = fields;
new->names = nameslist;
- new->hasobject=dtypeflags;
+ new->flags=dtypeflags;
if (maxalign > 1) {
totalsize = ((totalsize+maxalign-1)/maxalign)*maxalign;
}
@@ -839,7 +839,7 @@
new->names = conv->names;
Py_XINCREF(new->names);
}
- new->hasobject = conv->hasobject;
+ new->flags = conv->flags;
Py_DECREF(conv);
*errflag = 0;
return new;
@@ -1033,7 +1033,7 @@
if ((ret == PY_FAIL) || (newdescr->elsize == 0)) {
goto fail;
}
- dtypeflags |= (newdescr->hasobject & NPY_FROM_FIELDS);
+ dtypeflags |= (newdescr->flags & NPY_FROM_FIELDS);
totalsize += newdescr->elsize;
}
@@ -1056,7 +1056,7 @@
}
new->names = names;
new->fields = fields;
- new->hasobject = dtypeflags;
+ new->flags = dtypeflags;
metadata = PyDict_GetItemString(obj, "metadata");
@@ -1477,7 +1477,7 @@
{"alignment",
T_INT, offsetof(PyArray_Descr, alignment), READONLY, NULL},
{"flags",
- T_UBYTE, offsetof(PyArray_Descr, hasobject), READONLY, NULL},
+ T_INT, offsetof(PyArray_Descr, flags), READONLY, NULL},
{NULL, 0, 0, 0, NULL},
};
@@ -2079,7 +2079,7 @@
}
PyTuple_SET_ITEM(state, 5, PyInt_FromLong(elsize));
PyTuple_SET_ITEM(state, 6, PyInt_FromLong(alignment));
- PyTuple_SET_ITEM(state, 7, PyInt_FromLong(self->hasobject));
+ PyTuple_SET_ITEM(state, 7, PyInt_FromLong(self->flags));
PyTuple_SET_ITEM(ret, 2, state);
return ret;
@@ -2091,7 +2091,7 @@
static int
_descr_find_object(PyArray_Descr *self)
{
- if (self->hasobject || self->type_num == PyArray_OBJECT ||
+ if (self->flags || self->type_num == PyArray_OBJECT ||
self->kind == 'O') {
return NPY_OBJECT_DTYPE_FLAGS;
}
@@ -2110,7 +2110,7 @@
return 0;
}
if (_descr_find_object(new)) {
- new->hasobject = NPY_OBJECT_DTYPE_FLAGS;
+ new->flags = NPY_OBJECT_DTYPE_FLAGS;
return NPY_OBJECT_DTYPE_FLAGS;
}
}
@@ -2156,6 +2156,7 @@
&subarray, &names, &fields, &elsize,
&alignment, &dtypeflags, &metadata)) {
return NULL;
+#undef _ARGSTR_
}
break;
case 8:
@@ -2168,6 +2169,7 @@
&subarray, &names, &fields, &elsize,
&alignment, &dtypeflags)) {
return NULL;
+#undef _ARGSTR_
}
break;
case 7:
@@ -2180,6 +2182,7 @@
&subarray, &names, &fields, &elsize,
&alignment)) {
return NULL;
+#undef _ARGSTR_
}
break;
case 6:
@@ -2192,6 +2195,7 @@
&endian, &subarray, &fields,
&elsize, &alignment)) {
PyErr_Clear();
+#undef _ARGSTR_
}
break;
case 5:
@@ -2204,6 +2208,7 @@
if (!PyArg_ParseTuple(args, _ARGSTR_,
&endian, &subarray, &fields, &elsize,
&alignment)) {
+#undef _ARGSTR_
return NULL;
}
break;
@@ -2289,9 +2294,9 @@
self->alignment = alignment;
}
- self->hasobject = dtypeflags;
+ self->flags = dtypeflags;
if (version < 3) {
- self->hasobject = _descr_find_object(self);
+ self->flags = _descr_find_object(self);
}
Py_XDECREF(self->metadata);
Modified: trunk/numpy/core/src/multiarray/hashdescr.c
===================================================================
--- trunk/numpy/core/src/multiarray/hashdescr.c 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/numpy/core/src/multiarray/hashdescr.c 2010-02-15 23:13:16 UTC (rev 8113)
@@ -53,11 +53,11 @@
PyObject *t, *item;
/*
- * For builtin type, hash relies on : kind + byteorder + hasobject +
+ * For builtin type, hash relies on : kind + byteorder + flags +
* type_num + elsize + alignment
*/
- t = Py_BuildValue("(ccciii)", descr->kind, descr->byteorder,
- descr->hasobject, descr->type_num, descr->elsize,
+ t = Py_BuildValue("(cciiii)", descr->kind, descr->byteorder,
+ descr->flags, descr->type_num, descr->elsize,
descr->alignment);
for(i = 0; i < PyTuple_Size(t); ++i) {
Modified: trunk/numpy/core/src/multiarray/mapping.c
===================================================================
--- trunk/numpy/core/src/multiarray/mapping.c 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/numpy/core/src/multiarray/mapping.c 2010-02-15 23:13:16 UTC (rev 8113)
@@ -316,7 +316,7 @@
(PyArray_ISNOTSWAPPED(arr)));
copyswap = PyArray_DESCR(arr)->f->copyswap;
PyArray_MapIterReset(mit);
- /* Need to decref hasobject arrays */
+ /* Need to decref arrays with objects in them */
if (PyDataType_FLAGCHK(descr, NPY_ITEM_HASOBJECT)) {
while (index--) {
PyArray_Item_INCREF(it->dataptr, PyArray_DESCR(arr));
Modified: trunk/numpy/core/src/multiarray/multiarraymodule.c
===================================================================
--- trunk/numpy/core/src/multiarray/multiarraymodule.c 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/numpy/core/src/multiarray/multiarraymodule.c 2010-02-15 23:13:16 UTC (rev 8113)
@@ -42,8 +42,6 @@
#include "number.h"
#include "scalartypes.h"
-NPY_NO_EXPORT PyTypeObject PyBigArray_Type;
-
/*NUMPY_API
* Get Priority from object
*/
Modified: trunk/numpy/random/mtrand/numpy.pxi
===================================================================
--- trunk/numpy/random/mtrand/numpy.pxi 2010-02-14 23:04:18 UTC (rev 8112)
+++ trunk/numpy/random/mtrand/numpy.pxi 2010-02-15 23:13:16 UTC (rev 8113)
@@ -73,7 +73,7 @@
ctypedef extern class numpy.dtype [object PyArray_Descr]:
cdef int type_num, elsize, alignment
- cdef char type, kind, byteorder, hasobject
+ cdef char type, kind, byteorder, flags
cdef object fields, typeobj
ctypedef extern class numpy.ndarray [object PyArrayObject]:
More information about the Numpy-svn
mailing list