summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorThomas Robitaille <thomas.robitaille@gmail.com>2012-11-22 20:51:41 +0100
committerThomas Robitaille <thomas.robitaille@gmail.com>2012-11-22 20:51:41 +0100
commitdba24990f8bef9a5a1e67ef86ff6c58d8f59082f (patch)
treed1e02b50b537b236adeaa2d58573fd2605cf64fd /numpy
parentab66c255dc867ac00450960adeac29910dc4fa66 (diff)
downloadnumpy-dba24990f8bef9a5a1e67ef86ff6c58d8f59082f.tar.gz
Improvements to ndarray.view docstring
Diffstat (limited to 'numpy')
-rw-r--r--numpy/add_newdocs.py10
-rw-r--r--numpy/ma/core.py5
2 files changed, 9 insertions, 6 deletions
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.
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index 2b2e36a3a..8f44ba75f 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -2862,8 +2862,9 @@ class MaskedArray(ndarray):
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`. As with ``ndarray.view``, dtype can also be specified as
- an ndarray sub-class, which becomes the type of the returned
- object (this is equivalent to setting the ``type`` parameter).
+ 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.