diff options
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/add_newdocs.py | 11 | ||||
-rw-r--r-- | numpy/core/src/scalartypes.inc.src | 1 |
2 files changed, 8 insertions, 4 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py index 2e91bea7c..acc333a44 100644 --- a/numpy/add_newdocs.py +++ b/numpy/add_newdocs.py @@ -2,15 +2,18 @@ from lib import add_newdoc add_newdoc('numpy.core','dtype', - [('fields', "Fields of the data-typedescr if any."), + [('fields', "Fields of the data-type or None if no fields"), + ('names', "Names of fields or None if no fields"), ('alignment', "Needed alignment for this data-type"), ('byteorder', "Little-endian (<), big-endian (>), native (=), or "\ "not-applicable (|)"), - ('char', "Letter typecode for this descriptor"), - ('dtype', "Typeobject associated with this descriptor"), - ('kind', "Character giving type-family of this descriptor"), + ('char', "Letter typecode for this data-type"), + ('type', "Typeobject associated with this data-type"), + ('kind', "Character giving type-family of this data-type"), ('itemsize', "Size of each item"), + ('hasobject', "Non-zero if Python objects are in "\ + "this data-type"), ('num', "Internally-used number for builtin base") ] ) diff --git a/numpy/core/src/scalartypes.inc.src b/numpy/core/src/scalartypes.inc.src index fedce2d71..51eb74d40 100644 --- a/numpy/core/src/scalartypes.inc.src +++ b/numpy/core/src/scalartypes.inc.src @@ -1689,6 +1689,7 @@ object_arrtype_dealloc(PyObject *v) sup = (PyTypeObject *)PyTuple_GET_ITEM(type->tp_bases, num); \ ret = sup->tp_new(type, args, kwds); \ if (ret) return ret; \ + if (PyTuple_GET_SIZE(args)!=1) return NULL; \ PyErr_Clear(); \ /* now do default conversion */ \ } |