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. If this is a tuple
(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue,
where=np._NoValue)
| 3186 | |
| 3187 | @array_function_dispatch(_min_dispatcher) |
| 3188 | def min(a, axis=None, out=None, keepdims=np._NoValue, initial=np._NoValue, |
| 3189 | where=np._NoValue): |
| 3190 | """ |
| 3191 | Return the minimum of an array or minimum along an axis. |
| 3192 | |
| 3193 | Parameters |
| 3194 | ---------- |
| 3195 | a : array_like |
| 3196 | Input data. |
| 3197 | axis : None or int or tuple of ints, optional |
| 3198 | Axis or axes along which to operate. By default, flattened input is |
| 3199 | used. |
| 3200 | |
| 3201 | If this is a tuple of ints, the minimum is selected over multiple axes, |
| 3202 | instead of a single axis or all the axes as before. |
| 3203 | out : ndarray, optional |
| 3204 | Alternative output array in which to place the result. Must |
| 3205 | be of the same shape and buffer length as the expected output. |
| 3206 | See :ref:`ufuncs-output-type` for more details. |
| 3207 | |
| 3208 | keepdims : bool, optional |
| 3209 | If this is set to True, the axes which are reduced are left |
| 3210 | in the result as dimensions with size one. With this option, |
| 3211 | the result will broadcast correctly against the input array. |
| 3212 | |
| 3213 | If the default value is passed, then `keepdims` will not be |
| 3214 | passed through to the ``min`` method of sub-classes of |
| 3215 | `ndarray`, however any non-default value will be. If the |
| 3216 | sub-class' method does not implement `keepdims` any |
| 3217 | exceptions will be raised. |
| 3218 | |
| 3219 | initial : scalar, optional |
| 3220 | The maximum value of an output element. Must be present to allow |
| 3221 | computation on empty slice. See `~numpy.ufunc.reduce` for details. |
| 3222 | |
| 3223 | where : array_like of bool, optional |
| 3224 | Elements to compare for the minimum. See `~numpy.ufunc.reduce` |
| 3225 | for details. |
| 3226 | |
| 3227 | Returns |
| 3228 | ------- |
| 3229 | min : ndarray or scalar |
| 3230 | Minimum of `a`. If `axis` is None, the result is a scalar value. |
| 3231 | If `axis` is an int, the result is an array of dimension |
| 3232 | ``a.ndim - 1``. If `axis` is a tuple, the result is an array of |
| 3233 | dimension ``a.ndim - len(axis)``. |
| 3234 | |
| 3235 | See Also |
| 3236 | -------- |
| 3237 | max : |
| 3238 | The maximum value of an array along a given axis, propagating any NaNs. |
| 3239 | nanmin : |
| 3240 | The minimum value of an array along a given axis, ignoring any NaNs. |
| 3241 | minimum : |
| 3242 | Element-wise minimum of two arrays, propagating any NaNs. |
| 3243 | fmin : |
| 3244 | Element-wise minimum of two arrays, ignoring any NaNs. |
| 3245 | argmin : |