|
775 | 775 | ) |
776 | 776 | del _floor_divide_docstring_ |
777 | 777 |
|
| 778 | +# B11: ==== GREATER (x1, x2) |
| 779 | +_greater_docstring_ = r""" |
| 780 | +greater(x1, x2, /, \*, out=None, order='K') |
| 781 | +
|
| 782 | +Computes the greater-than test results for each element `x1_i` of |
| 783 | +the input array `x1` with the respective element `x2_i` of the input array `x2`. |
| 784 | +
|
| 785 | +Args: |
| 786 | + x1 (usm_ndarray): |
| 787 | + First input array. May have any data type. |
| 788 | + x2 (usm_ndarray): |
| 789 | + Second input array. May have any data type. |
| 790 | + out (Union[usm_ndarray, None], optional): |
| 791 | + Output array to populate. |
| 792 | + Array must have the correct shape and the expected data type. |
| 793 | + order ("C","F","A","K", optional): |
| 794 | + Memory layout of the new output array, if parameter |
| 795 | + `out` is ``None``. |
| 796 | + Default: "K". |
| 797 | +
|
| 798 | +Returns: |
| 799 | + usm_ndarray: |
| 800 | + An array containing the result of element-wise greater-than comparison. |
| 801 | + The returned array has a data type of `bool`. |
| 802 | +""" |
| 803 | + |
| 804 | +greater = BinaryElementwiseFunc( |
| 805 | + "greater", |
| 806 | + ti._greater_result_type, |
| 807 | + ti._greater, |
| 808 | + _greater_docstring_, |
| 809 | + weak_type_resolver=_resolve_weak_types_all_py_ints, |
| 810 | +) |
| 811 | +del _greater_docstring_ |
| 812 | + |
| 813 | +# B12: ==== GREATER_EQUAL (x1, x2) |
| 814 | +_greater_equal_docstring_ = r""" |
| 815 | +greater_equal(x1, x2, /, \*, out=None, order='K') |
| 816 | +
|
| 817 | +Computes the greater-than or equal-to test results for each element `x1_i` of |
| 818 | +the input array `x1` with the respective element `x2_i` of the input array `x2`. |
| 819 | +
|
| 820 | +Args: |
| 821 | + x1 (usm_ndarray): |
| 822 | + First input array. May have any data type. |
| 823 | + x2 (usm_ndarray): |
| 824 | + Second input array. May have any data type. |
| 825 | + out (Union[usm_ndarray, None], optional): |
| 826 | + Output array to populate. |
| 827 | + Array must have the correct shape and the expected data type. |
| 828 | + order ("C","F","A","K", optional): |
| 829 | + Memory layout of the new output array, if parameter |
| 830 | + `out` is ``None``. |
| 831 | + Default: "K". |
| 832 | +
|
| 833 | +Returns: |
| 834 | + usm_ndarray: |
| 835 | + An array containing the result of element-wise greater-than or equal-to |
| 836 | + comparison. |
| 837 | + The returned array has a data type of `bool`. |
| 838 | +""" |
| 839 | + |
| 840 | +greater_equal = BinaryElementwiseFunc( |
| 841 | + "greater_equal", |
| 842 | + ti._greater_equal_result_type, |
| 843 | + ti._greater_equal, |
| 844 | + _greater_equal_docstring_, |
| 845 | + weak_type_resolver=_resolve_weak_types_all_py_ints, |
| 846 | +) |
| 847 | +del _greater_equal_docstring_ |
| 848 | + |
778 | 849 | # U14: ==== EXPM1 (x) |
779 | 850 | _expm1_docstring = r""" |
780 | 851 | expm1(x, /, \*, out=None, order='K') |
|
1440 | 1511 | ) |
1441 | 1512 | del _trunc_docstring |
1442 | 1513 |
|
| 1514 | +# B24: ==== HYPOT (x1, x2) |
| 1515 | +_hypot_docstring_ = r""" |
| 1516 | +hypot(x1, x2, /, \*, out=None, order='K') |
| 1517 | +
|
| 1518 | +Computes the square root of the sum of squares for each element `x1_i` of the |
| 1519 | +input array `x1` with the respective element `x2_i` of the input array `x2`. |
| 1520 | +
|
| 1521 | +Args: |
| 1522 | + x1 (usm_ndarray): |
| 1523 | + First input array, expected to have a real-valued floating-point data |
| 1524 | + type. |
| 1525 | + x2 (usm_ndarray): |
| 1526 | + Second input array, also expected to have a real-valued floating-point |
| 1527 | + data type. |
| 1528 | + out (Union[usm_ndarray, None], optional): |
| 1529 | + Output array to populate. |
| 1530 | + Array must have the correct shape and the expected data type. |
| 1531 | + order ("C","F","A","K", optional): |
| 1532 | + Memory layout of the new output array, if parameter |
| 1533 | + `out` is ``None``. |
| 1534 | + Default: "K". |
| 1535 | +
|
| 1536 | +Returns: |
| 1537 | + usm_ndarray: |
| 1538 | + An array containing the element-wise hypotenuse. The data type |
| 1539 | + of the returned array is determined by the Type Promotion Rules. |
| 1540 | +""" |
| 1541 | + |
| 1542 | +hypot = BinaryElementwiseFunc( |
| 1543 | + "hypot", ti._hypot_result_type, ti._hypot, _hypot_docstring_ |
| 1544 | +) |
| 1545 | +del _hypot_docstring_ |
| 1546 | + |
1443 | 1547 | # U37: ==== CBRT (x) |
1444 | 1548 | _cbrt_docstring_ = r""" |
1445 | 1549 | cbrt(x, /, \*, out=None, order='K') |
|
0 commit comments