| 6812 | min.__doc__ = MaskedArray.min.__doc__ |
| 6813 | |
| 6814 | def max(obj, axis=None, out=None, fill_value=None, keepdims=np._NoValue): |
| 6815 | kwargs = {} if keepdims is np._NoValue else {'keepdims': keepdims} |
| 6816 | |
| 6817 | try: |
| 6818 | return obj.max(axis=axis, fill_value=fill_value, out=out, **kwargs) |
| 6819 | except (AttributeError, TypeError): |
| 6820 | # If obj doesn't have a max method, or if the method doesn't accept a |
| 6821 | # fill_value argument |
| 6822 | return asanyarray(obj).max(axis=axis, fill_value=fill_value, |
| 6823 | out=out, **kwargs) |
| 6824 | max.__doc__ = MaskedArray.max.__doc__ |
| 6825 | |
| 6826 | |