|
42 | 42 | "logical_not",
|
43 | 43 | "logical_or",
|
44 | 44 | "logical_xor",
|
| 45 | + "maximum", |
| 46 | + "minimum", |
45 | 47 | "multiply",
|
46 | 48 | "negative",
|
47 | 49 | "not_equal",
|
@@ -1820,6 +1822,66 @@ def logical_xor(x1: array, x2: array, /) -> array:
|
1820 | 1822 | """
|
1821 | 1823 |
|
1822 | 1824 |
|
| 1825 | +def maximum(x1: array, x2: array, /) -> array: |
| 1826 | + r""" |
| 1827 | + Computes the maximum value for each element ``x1_i`` of the input array ``x1`` relative to the respective element ``x2_i`` of the input array ``x2``. |
| 1828 | +
|
| 1829 | + .. note:: |
| 1830 | + For backward compatibility, conforming implementations may support complex numbers; however, inequality comparison of complex numbers is unspecified and thus implementation-dependent (see :ref:`complex-number-ordering`). |
| 1831 | +
|
| 1832 | + Parameters |
| 1833 | + ---------- |
| 1834 | + x1: array |
| 1835 | + first input array. Should have a real-valued data type. |
| 1836 | + x2: array |
| 1837 | + second input array. Must be compatible with ``x1`` (see :ref:`broadcasting`). Should have a real-valued data type. |
| 1838 | +
|
| 1839 | + Returns |
| 1840 | + ------- |
| 1841 | + out: array |
| 1842 | + an array containing the element-wise maximum values. The returned array must have a data type determined by :ref:`type-promotion`. |
| 1843 | +
|
| 1844 | + Notes |
| 1845 | + ----- |
| 1846 | +
|
| 1847 | + **Special Cases** |
| 1848 | +
|
| 1849 | + For floating-point operands, |
| 1850 | +
|
| 1851 | + - If either ``x1_i`` or ``x2_i`` is ``NaN``, the result is ``NaN``. |
| 1852 | + """ |
| 1853 | + |
| 1854 | + |
| 1855 | +def minimum(x1: array, x2: array, /) -> array: |
| 1856 | + r""" |
| 1857 | + Computes the minimum value for each element ``x1_i`` of the input array ``x1`` relative to the respective element ``x2_i`` of the input array ``x2``. |
| 1858 | +
|
| 1859 | + .. note:: |
| 1860 | + For backward compatibility, conforming implementations may support complex numbers; however, inequality comparison of complex numbers is unspecified and thus implementation-dependent (see :ref:`complex-number-ordering`). |
| 1861 | +
|
| 1862 | + Parameters |
| 1863 | + ---------- |
| 1864 | + x1: array |
| 1865 | + first input array. Should have a real-valued data type. |
| 1866 | + x2: array |
| 1867 | + second input array. Must be compatible with ``x1`` (see :ref:`broadcasting`). Should have a real-valued data type. |
| 1868 | +
|
| 1869 | + Returns |
| 1870 | + ------- |
| 1871 | + out: array |
| 1872 | + an array containing the element-wise minimum values. The returned array must have a data type determined by :ref:`type-promotion`. |
| 1873 | +
|
| 1874 | + Notes |
| 1875 | + ----- |
| 1876 | +
|
| 1877 | + **Special Cases** |
| 1878 | +
|
| 1879 | + For floating-point operands, |
| 1880 | +
|
| 1881 | + - If either ``x1_i`` or ``x2_i`` is ``NaN``, the result is ``NaN``. |
| 1882 | + """ |
| 1883 | + |
| 1884 | + |
1823 | 1885 | def multiply(x1: array, x2: array, /) -> array:
|
1824 | 1886 | r"""
|
1825 | 1887 | Calculates the product for each element ``x1_i`` of the input array ``x1`` with the respective element ``x2_i`` of the input array ``x2``.
|
|
0 commit comments