diff options
author | MSeifert04 <michaelseifert04@yahoo.de> | 2019-07-07 15:49:39 +0200 |
---|---|---|
committer | MSeifert04 <michaelseifert04@yahoo.de> | 2019-07-08 08:22:07 +0200 |
commit | 27d1b68ebadf564b580bd8ace1233f22fdc66d38 (patch) | |
tree | c0d484cb1f6e2291fe492671759d03ed27a11070 | |
parent | 07555c841feb03683ce01d49762fe9b7053a5626 (diff) | |
download | numpy-27d1b68ebadf564b580bd8ace1233f22fdc66d38.tar.gz |
DOC: Don't override MaskedArray.view documentation with the one from ndarray.view
To document the fill_value parameter it's needed to display
the correct docstring of the function instead of overwriting
it with the docstring of ndarray.view
-rw-r--r-- | numpy/ma/core.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index 0403a85d4..9cb59131c 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -3077,7 +3077,7 @@ class MaskedArray(ndarray): def view(self, dtype=None, type=None, fill_value=None): """ - Return a view of the MaskedArray data + Return a view of the MaskedArray data. Parameters ---------- @@ -3091,6 +3091,14 @@ class MaskedArray(ndarray): type : Python type, optional Type of the returned view, either ndarray or a subclass. The default None results in type preservation. + fill_value : scalar, optional + The value to use for invalid entries (None by default). + If None, then this argument is inferred from the passed `dtype`, or + in its absence the original array, as discussed in the notes below. + + See Also + -------- + numpy.ndarray.view : Equivalent method on ndarray object. Notes ----- @@ -3156,7 +3164,6 @@ class MaskedArray(ndarray): else: output.fill_value = fill_value return output - view.__doc__ = ndarray.view.__doc__ def __getitem__(self, indx): """ |