summaryrefslogtreecommitdiff
path: root/numpy/add_newdocs.py
diff options
context:
space:
mode:
authorMatthew Brett <matthew.brett@gmail.com>2009-02-24 20:53:10 +0000
committerMatthew Brett <matthew.brett@gmail.com>2009-02-24 20:53:10 +0000
commit0dcb70f1b524215dafcd8133626ab6cebdb26e44 (patch)
treeedef8f993237bd2e97e13f58ac53d2d040e9842f /numpy/add_newdocs.py
parentf1737c782aad8b17410d42c0e41c827c24477341 (diff)
downloadnumpy-0dcb70f1b524215dafcd8133626ab6cebdb26e44.tar.gz
Added docstring for isbuiltin
Diffstat (limited to 'numpy/add_newdocs.py')
-rw-r--r--numpy/add_newdocs.py29
1 files changed, 28 insertions, 1 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py
index 68224485c..a700458a9 100644
--- a/numpy/add_newdocs.py
+++ b/numpy/add_newdocs.py
@@ -2937,7 +2937,7 @@ add_newdoc('numpy.core.multiarray', 'dtype', ('alignment',
add_newdoc('numpy.core.multiarray', 'dtype', ('byteorder',
'''
- dt.byteorder
+ byteorder
String giving byteorder of dtype
@@ -2995,6 +2995,33 @@ add_newdoc('numpy.core.multiarray', 'dtype', ('hasobject',
add_newdoc('numpy.core.multiarray', 'dtype', ('isbuiltin',
"""
+ isbuiltin
+
+ Value identifying if numpy dtype is a numpy builtin type
+
+ Read-only
+
+ Returns
+ -------
+ val : {0,1,2}
+ 0 if this is a structured array type, with fields
+ 1 if this is a dtype compiled into numpy (such as ints, floats etc)
+ 2 if the dtype is for a user-defined numpy type
+ A user-defined type uses the numpy C-API machinery to extend
+ numpy to handle a new array type. See the Guide to Numpy for
+ details.
+
+ Examples
+ --------
+ >>> dt = np.dtype('i2')
+ >>> dt.isbuiltin
+ 1
+ >>> dt = np.dtype('f8')
+ >>> dt.isbuiltin
+ 1
+ >>> dt = np.dtype([('field1', 'f8')])
+ >>> dt.isbuiltin
+ 0
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('isnative',