summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2016-01-04 07:38:23 -0700
committerCharles Harris <charlesr.harris@gmail.com>2016-01-04 07:38:23 -0700
commit2fb2b66aa459d30120b9c2abd98c736cbf853cc0 (patch)
treec70efdcaf8654ed676e6471243264094c71e3015
parentb8fef84a5b505cec9312d606c6639e35269d50f3 (diff)
parent4d129a4cc72d0d86d666545890cf010db27fcd8e (diff)
downloadnumpy-2fb2b66aa459d30120b9c2abd98c736cbf853cc0.tar.gz
Merge pull request #6920 from gfyoung/filled_documentation
DOC: Fix documentation on MaskedArray.filled
-rw-r--r--numpy/ma/core.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index de716a669..9b0b1cc79 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -3526,6 +3526,8 @@ class MaskedArray(ndarray):
def filled(self, fill_value=None):
"""
Return a copy of self, with masked values filled with a given value.
+ **However**, if there are no masked values to fill, self will be
+ returned instead as an ndarray.
Parameters
----------
@@ -3537,7 +3539,9 @@ class MaskedArray(ndarray):
-------
filled_array : ndarray
A copy of ``self`` with invalid entries replaced by *fill_value*
- (be it the function argument or the attribute of ``self``.
+ (be it the function argument or the attribute of ``self``), or
+ ``self`` itself as an ndarray if there are no invalid entries to
+ be replaced.
Notes
-----