Permalink
Browse files

API and ABI changes: Removed BigArrayType, Fixed hasobject to an inte…

…ger (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.
  • Loading branch information...
1 parent 29efc30 commit 20ec480ff8979fce00ab076ef74893815bf88f4e @teoliphant teoliphant committed Feb 15, 2010
View
@@ -61,9 +61,9 @@ This is a very flexible function.
``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 @@ This is a very flexible function.
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
View
@@ -76,7 +76,8 @@ cdef extern from "numpy/arrayobject.h":
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]:
View
@@ -599,7 +599,15 @@ char
\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
@@ -674,9 +682,9 @@ NPY_USE_SETITEM
\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 @@ ndian), '=' (native), '|' (irrelevant, ignore).
\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
@@ -73,7 +73,8 @@ cdef extern from "numpy/arrayobject.h":
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]:
View
@@ -75,7 +75,8 @@ cdef extern from "numpy/arrayobject.h":
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]:
@@ -191,7 +191,8 @@ PyArrayDescr_Type
char kind;
char type;
char byteorder;
- char hasobject;
+ char unused;
+ int flags;
int type_num;
int elsize;
int alignment;
@@ -208,7 +209,7 @@ PyArrayDescr_Type
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 @@ PyArrayDescr_Type
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
@@ -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
Oops, something went wrong.

0 comments on commit 20ec480

Please sign in to comment.