[Numpy-svn] r2854 - in trunk/numpy: . core/src
numpy-svn at scipy.org
numpy-svn at scipy.org
Thu Jul 20 16:57:36 EDT 2006
Author: oliphant
Date: 2006-07-20 15:57:30 -0500 (Thu, 20 Jul 2006)
New Revision: 2854
Modified:
trunk/numpy/add_newdocs.py
trunk/numpy/core/src/scalartypes.inc.src
Log:
Add more documentation. Fix #99
Modified: trunk/numpy/add_newdocs.py
===================================================================
--- trunk/numpy/add_newdocs.py 2006-07-20 17:58:45 UTC (rev 2853)
+++ trunk/numpy/add_newdocs.py 2006-07-20 20:57:30 UTC (rev 2854)
@@ -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")
]
)
Modified: trunk/numpy/core/src/scalartypes.inc.src
===================================================================
--- trunk/numpy/core/src/scalartypes.inc.src 2006-07-20 17:58:45 UTC (rev 2853)
+++ trunk/numpy/core/src/scalartypes.inc.src 2006-07-20 20:57:30 UTC (rev 2854)
@@ -1689,6 +1689,7 @@
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 */ \
}
More information about the Numpy-svn
mailing list