Return the minimum of an array or minimum along an axis. Parameters ---------- a : array_like Input data. axis : None or int or tuple of ints, optional Axis or axes along which to operate. By default, flattened input is used. .. versionadded::
(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue,
where=np._NoValue)
| 2835 | |
| 2836 | @array_function_dispatch(_min_dispatcher) |
| 2837 | def min(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue, |
| 2838 | where=np._NoValue): |
| 2839 | """ |
| 2840 | Return the minimum of an array or minimum along an axis. |
| 2841 | |
| 2842 | Parameters |
| 2843 | ---------- |
| 2844 | a : array_like |
| 2845 | Input data. |
| 2846 | axis : None or int or tuple of ints, optional |
| 2847 | Axis or axes along which to operate. By default, flattened input is |
| 2848 | used. |
| 2849 | |
| 2850 | .. versionadded:: 1.7.0 |
| 2851 | |
| 2852 | If this is a tuple of ints, the minimum is selected over multiple axes, |
| 2853 | instead of a single axis or all the axes as before. |
| 2854 | out : ndarray, optional |
| 2855 | Alternative output array in which to place the result. Must |
| 2856 | be of the same shape and buffer length as the expected output. |
| 2857 | See :ref:`ufuncs-output-type` for more details. |
| 2858 | |
| 2859 | keepdims : bool, optional |
| 2860 | If this is set to True, the axes which are reduced are left |
| 2861 | in the result as dimensions with size one. With this option, |
| 2862 | the result will broadcast correctly against the input array. |
| 2863 | |
| 2864 | If the default value is passed, then `keepdims` will not be |
| 2865 | passed through to the ``min`` method of sub-classes of |
| 2866 | `ndarray`, however any non-default value will be. If the |
| 2867 | sub-class' method does not implement `keepdims` any |
| 2868 | exceptions will be raised. |
| 2869 | |
| 2870 | initial : scalar, optional |
| 2871 | The maximum value of an output element. Must be present to allow |
| 2872 | computation on empty slice. See `~numpy.ufunc.reduce` for details. |
| 2873 | |
| 2874 | .. versionadded:: 1.15.0 |
| 2875 | |
| 2876 | where : array_like of bool, optional |
| 2877 | Elements to compare for the minimum. See `~numpy.ufunc.reduce` |
| 2878 | for details. |
| 2879 | |
| 2880 | .. versionadded:: 1.17.0 |
| 2881 | |
| 2882 | Returns |
| 2883 | ------- |
| 2884 | min : ndarray or scalar |
| 2885 | Minimum of `a`. If `axis` is None, the result is a scalar value. |
| 2886 | If `axis` is an int, the result is an array of dimension |
| 2887 | ``a.ndim - 1``. If `axis` is a tuple, the result is an array of |
| 2888 | dimension ``a.ndim - len(axis)``. |
| 2889 | |
| 2890 | See Also |
| 2891 | -------- |
| 2892 | amax : |
| 2893 | The maximum value of an array along a given axis, propagating any NaNs. |
| 2894 | nanmin : |