From dba24990f8bef9a5a1e67ef86ff6c58d8f59082f Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Thu, 22 Nov 2012 20:51:41 +0100 Subject: Improvements to ndarray.view docstring --- numpy/add_newdocs.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'numpy/add_newdocs.py') diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py index 09effaaf5..26711f177 100644 --- a/numpy/add_newdocs.py +++ b/numpy/add_newdocs.py @@ -4437,10 +4437,12 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('view', Parameters ---------- - dtype : data-type, optional - Data-type descriptor of the returned view, e.g., float32 or int16. - The default, None, results in the view having the same data-type - as `a`. + dtype : data-type or ndarray sub-class, optional + Data-type descriptor of the returned view, e.g., float32 or int16. The + default, None, results in the view having the same data-type as `a`. + This argument can also be specified as an ndarray sub-class, which + then specifies the type of the returned object (this is equivalent to + setting the ``type`` parameter). type : Python type, optional Type of the returned view, e.g., ndarray or matrix. Again, the default None results in type preservation. -- cgit v1.2.1