Skip to content

Commit

Permalink
DOC: Adds documentation for numpy.dtype.base
Browse files Browse the repository at this point in the history
  • Loading branch information
kritisingh1 committed Jun 3, 2019
1 parent b90e09c commit f480d6e
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions numpy/core/_add_newdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5621,6 +5621,41 @@
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',
Expand Down

0 comments on commit f480d6e

Please sign in to comment.