Skip to content

Commit

Permalink
DOC : PyArray_Descr.names undocumented (numpy#13234)
Browse files Browse the repository at this point in the history
* Updating the definition of PyArray_Descr struct
  • Loading branch information
vrindaaa authored and mattip committed Apr 3, 2019
1 parent 9eb9c35 commit c1bf6a6
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions doc/source/reference/c-api.types-and-structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,17 @@ PyArrayDescr_Type
char kind;
char type;
char byteorder;
char unused;
int flags;
char flags;
int type_num;
int elsize;
int alignment;
PyArray_ArrayDescr *subarray;
PyObject *fields;
PyObject *names;
PyArray_ArrFuncs *f;
PyObject *metadata;
NpyAuxData *c_metadata;
npy_hash_t hash;
} PyArray_Descr;
.. c:member:: PyTypeObject *PyArray_Descr.typeobj
Expand Down Expand Up @@ -242,7 +245,7 @@ PyArrayDescr_Type
endian), '=' (native), '\|' (irrelevant, ignore). All builtin data-
types have byteorder '='.

.. c:member:: int PyArray_Descr.flags
.. c:member:: char 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
Expand Down Expand Up @@ -377,13 +380,32 @@ PyArrayDescr_Type
normally a Python string. These tuples are placed in this
dictionary keyed by name (and also title if given).

.. c:member:: PyObject *PyArray_Descr.names
An ordered tuple of field names. It is NULL if no field is
defined.

.. c:member:: PyArray_ArrFuncs *PyArray_Descr.f
A pointer to a structure containing functions that the type needs
to implement internal features. These functions are not the same
thing as the universal functions (ufuncs) described later. Their
signatures can vary arbitrarily.

.. c:member:: PyObject *PyArray_Descr.metadata
Metadata about this dtype.

.. c:member:: NpyAuxData *PyArray_Descr.c_metadata
Metadata specific to the C implementation
of the particular dtype. Added for NumPy 1.7.0.

.. c:member:: Npy_hash_t *PyArray_Descr.hash
Currently unused. Reserved for future use in caching
hash values.

.. c:type:: PyArray_ArrFuncs
Functions implementing internal features. Not all of these
Expand Down

0 comments on commit c1bf6a6

Please sign in to comment.