summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorkritisingh1 <kritisingh1.ks@gmail.com>2019-06-04 01:43:31 +0530
committerkritisingh1 <kritisingh1.ks@gmail.com>2019-06-04 02:28:46 +0530
commitf480d6ed70aa12bada2b8c6594983a2c0366400c (patch)
tree167d84859942800af83fc19b4f21c87bc748b0cd /numpy
parentb90e09c1232861cb0a22628e29261e6cc8382df0 (diff)
downloadnumpy-f480d6ed70aa12bada2b8c6594983a2c0366400c.tar.gz
DOC: Adds documentation for numpy.dtype.base
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/_add_newdocs.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py
index bdff64b20..f0e952acf 100644
--- a/numpy/core/_add_newdocs.py
+++ b/numpy/core/_add_newdocs.py
@@ -5621,6 +5621,41 @@ add_newdoc('numpy.core.multiarray', 'dtype', ('subdtype',
then the extra dimensions implied by *shape* are tacked on to
the end of the retrieved array.
+ See Also
+ --------
+ dtype.base
+
+ Examples
+ --------
+ >>> x = numpy.dtype('8f')
+ >>> x.subdtype
+ (dtype('float32'), (8,))
+
+ >>> x = numpy.dtype('i2')
+ >>> x.subdtype
+ >>>
+
+ """))
+
+add_newdoc('numpy.core.multiarray', 'dtype', ('base',
+ """
+ Returns dtype for the base element of the subarrays,
+ regardless of their dimension or shape.
+
+ See Also
+ --------
+ dtype.subdtype
+
+ Examples
+ --------
+ >>> x = numpy.dtype('8f')
+ >>> x.base
+ dtype('float32')
+
+ >>> x = numpy.dtype('i2')
+ >>> x.base
+ dtype('int16')
+
"""))
add_newdoc('numpy.core.multiarray', 'dtype', ('type',