summaryrefslogtreecommitdiff
path: root/numpy/add_newdocs.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-02-24 17:07:31 +0000
committerEric Wieser <wieser.eric@gmail.com>2017-02-25 13:57:13 +0000
commit38ce8097749ad69494926036250ed5b2de66184c (patch)
tree17e176067c11081da0843fc78c9920ccb9281130 /numpy/add_newdocs.py
parent48783e5ceb7f60c33db81ab72e5024f42b220990 (diff)
downloadnumpy-38ce8097749ad69494926036250ed5b2de66184c.tar.gz
ENH: add a .ndim property to dype objects
This complements the .shape property
Diffstat (limited to 'numpy/add_newdocs.py')
-rw-r--r--numpy/add_newdocs.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py
index 3916d1304..cf4af9f84 100644
--- a/numpy/add_newdocs.py
+++ b/numpy/add_newdocs.py
@@ -6355,6 +6355,15 @@ add_newdoc('numpy.core.multiarray', 'dtype', ('shape',
"""))
+add_newdoc('numpy.core.multiarray', 'dtype', ('ndim',
+ """
+ Number of dimensions of the sub-array if this data type describes a
+ sub-array, and ``0`` otherwise.
+
+ .. versionadded:: 1.13.0
+
+ """))
+
add_newdoc('numpy.core.multiarray', 'dtype', ('str',
"""The array-protocol typestring of this data-type object."""))