| 7017 | min.__doc__ = MaskedArray.min.__doc__ |
| 7018 | |
| 7019 | def max(obj, axis=None, out=None, fill_value=None, keepdims=np._NoValue): |
| 7020 | kwargs = {} if keepdims is np._NoValue else {'keepdims': keepdims} |
| 7021 | |
| 7022 | try: |
| 7023 | return obj.max(axis=axis, fill_value=fill_value, out=out, **kwargs) |
| 7024 | except (AttributeError, TypeError): |
| 7025 | # If obj doesn't have a max method, or if the method doesn't accept a |
| 7026 | # fill_value argument |
| 7027 | return asanyarray(obj).max(axis=axis, fill_value=fill_value, |
| 7028 | out=out, **kwargs) |
| 7029 | |
| 7030 | |
| 7031 | max.__doc__ = MaskedArray.max.__doc__ |