summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Deak <deak.andris@gmail.com>2020-01-06 02:24:08 +0100
committerAndras Deak <deak.andris@gmail.com>2020-01-06 02:24:34 +0100
commitb3c37ce09f48a808b80d65937d1fbe3335765362 (patch)
tree5b24acda60018a68c5da3bca5e3fbf8d75e626fe
parenta66ebb1a97efbb22940adee1c4d721f07d967265 (diff)
downloadnumpy-b3c37ce09f48a808b80d65937d1fbe3335765362.tar.gz
DOC: Change signature of ndarray.view to remove misleading defaults
Also remove the now-superfluous note explaining behaviour when None is explicitly passed.
-rw-r--r--numpy/core/_add_newdocs.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py
index 5ff12a2c7..33e062803 100644
--- a/numpy/core/_add_newdocs.py
+++ b/numpy/core/_add_newdocs.py
@@ -4122,7 +4122,7 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('var',
add_newdoc('numpy.core.multiarray', 'ndarray', ('view',
"""
- a.view(dtype=None, type=None)
+ a.view([dtype][, type])
New view of array with the same data.
@@ -4160,11 +4160,6 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('view',
defined as a slice or transpose, etc., the view may give different
results.
- Passing None explicitly for ``dtype`` is different from omitting the
- parameter, since the former invokes ``dtype(None)`` which is an alias for
- ``dtype('float_')``. Similarly, explicitly passing None for ``type``
- is an error.
-
Examples
--------