minimum¶
- minimum(x1: array | int | float, x2: array | int | float, /) array¶
Computes the minimum value for each element
x1_iof the input arrayx1relative to the respective elementx2_iof the input arrayx2.- Parameters:
x1 (Union[array, int, float]) – first input array. Should have a real-valued data type.
x2 (Union[array, int, float]) – second input array. Must be compatible with
x1(see Broadcasting). Should have a real-valued data type.
- Returns:
out (array) – an array containing the element-wise minimum values. The returned array must have a data type determined by Type Promotion Rules.
Notes
At least one of
x1orx2must be an array.The order of signed zeros is unspecified and thus implementation-defined. When choosing between
-0or+0as a minimum value, specification-compliant libraries may choose to return either value.For backward compatibility, conforming implementations may support complex numbers; however, inequality comparison of complex numbers is unspecified and thus implementation-defined (see Complex Number Ordering).
Special Cases
For floating-point operands,
If either
x1_iorx2_iisNaN, the result isNaN.
New in version 2023.12.
Changed in version 2024.12: Added scalar argument support.