|
572 | 572 | # FIXME: implement B15
|
573 | 573 |
|
574 | 574 | # B16: ==== LOGICAL_AND (x1, x2)
|
575 |
| -# FIXME: implement B16 |
| 575 | +_logical_and_docstring_ = """ |
| 576 | +multiply(x1, x2, out=None, order='K') |
| 577 | +
|
| 578 | +Calculates the product for each element `x1_i` of the input array `x1` |
| 579 | +with the respective element `x2_i` of the input array `x2`. |
| 580 | +
|
| 581 | +Args: |
| 582 | + x1 (usm_ndarray): |
| 583 | + First input array, expected to have numeric data type. |
| 584 | + x2 (usm_ndarray): |
| 585 | + Second input array, also expected to have numeric data type. |
| 586 | + out ({None, usm_ndarray}, optional): |
| 587 | + Output array to populate. |
| 588 | + Array have the correct shape and the expected data type. |
| 589 | + order ("C","F","A","K", optional): |
| 590 | + Memory layout of the newly output array, if parameter `out` is `None`. |
| 591 | + Default: "K". |
| 592 | +Returns: |
| 593 | + usm_narray: |
| 594 | + An array containing the element-wise products. The data type of |
| 595 | + the returned array is determined by the Type Promotion Rules. |
| 596 | +""" |
| 597 | +logical_and = BinaryElementwiseFunc( |
| 598 | + "logical_and", |
| 599 | + ti._logical_and_result_type, |
| 600 | + ti._logical_and, |
| 601 | + _logical_and_docstring_, |
| 602 | +) |
576 | 603 |
|
577 | 604 | # U24: ==== LOGICAL_NOT (x)
|
578 |
| -# FIXME: implement U24 |
| 605 | +_logical_not_docstring = """ |
| 606 | +log(x, out=None, order='K') |
| 607 | +Computes the natural logarithm element-wise. |
| 608 | +Args: |
| 609 | + x (usm_ndarray): |
| 610 | + Input array, expected to have numeric data type. |
| 611 | + out (usm_ndarray): |
| 612 | + Output array to populate. Array must have the correct |
| 613 | + shape and the expected data type. |
| 614 | + order ("C","F","A","K", optional): memory layout of the new |
| 615 | + output array, if parameter `out` is `None`. |
| 616 | + Default: "K". |
| 617 | +Return: |
| 618 | + usm_ndarray: |
| 619 | + An array containing the element-wise natural logarithm values. |
| 620 | +""" |
| 621 | + |
| 622 | +logical_not = UnaryElementwiseFunc( |
| 623 | + "logical_not", |
| 624 | + ti._logical_not_result_type, |
| 625 | + ti._logical_not, |
| 626 | + _logical_not_docstring, |
| 627 | +) |
579 | 628 |
|
580 | 629 | # B17: ==== LOGICAL_OR (x1, x2)
|
581 |
| -# FIXME: implement B17 |
| 630 | +_logical_or_docstring_ = """ |
| 631 | +multiply(x1, x2, out=None, order='K') |
| 632 | +
|
| 633 | +Calculates the product for each element `x1_i` of the input array `x1` |
| 634 | +with the respective element `x2_i` of the input array `x2`. |
| 635 | +
|
| 636 | +Args: |
| 637 | + x1 (usm_ndarray): |
| 638 | + First input array, expected to have numeric data type. |
| 639 | + x2 (usm_ndarray): |
| 640 | + Second input array, also expected to have numeric data type. |
| 641 | + out ({None, usm_ndarray}, optional): |
| 642 | + Output array to populate. |
| 643 | + Array have the correct shape and the expected data type. |
| 644 | + order ("C","F","A","K", optional): |
| 645 | + Memory layout of the newly output array, if parameter `out` is `None`. |
| 646 | + Default: "K". |
| 647 | +Returns: |
| 648 | + usm_narray: |
| 649 | + An array containing the element-wise products. The data type of |
| 650 | + the returned array is determined by the Type Promotion Rules. |
| 651 | +""" |
| 652 | +logical_or = BinaryElementwiseFunc( |
| 653 | + "logical_or", |
| 654 | + ti._logical_or_result_type, |
| 655 | + ti._logical_or, |
| 656 | + _logical_or_docstring_, |
| 657 | +) |
582 | 658 |
|
583 | 659 | # B18: ==== LOGICAL_XOR (x1, x2)
|
584 |
| -# FIXME: implement B18 |
| 660 | +_logical_xor_docstring_ = """ |
| 661 | +multiply(x1, x2, out=None, order='K') |
| 662 | +
|
| 663 | +Calculates the product for each element `x1_i` of the input array `x1` |
| 664 | +with the respective element `x2_i` of the input array `x2`. |
| 665 | +
|
| 666 | +Args: |
| 667 | + x1 (usm_ndarray): |
| 668 | + First input array, expected to have numeric data type. |
| 669 | + x2 (usm_ndarray): |
| 670 | + Second input array, also expected to have numeric data type. |
| 671 | + out ({None, usm_ndarray}, optional): |
| 672 | + Output array to populate. |
| 673 | + Array have the correct shape and the expected data type. |
| 674 | + order ("C","F","A","K", optional): |
| 675 | + Memory layout of the newly output array, if parameter `out` is `None`. |
| 676 | + Default: "K". |
| 677 | +Returns: |
| 678 | + usm_narray: |
| 679 | + An array containing the element-wise products. The data type of |
| 680 | + the returned array is determined by the Type Promotion Rules. |
| 681 | +""" |
| 682 | +logical_xor = BinaryElementwiseFunc( |
| 683 | + "logical_xor", |
| 684 | + ti._logical_xor_result_type, |
| 685 | + ti._logical_xor, |
| 686 | + _logical_xor_docstring_, |
| 687 | +) |
585 | 688 |
|
586 | 689 | # B19: ==== MULTIPLY (x1, x2)
|
587 | 690 | _multiply_docstring_ = """
|
|
0 commit comments