Returns True if `shape_x` and `shape_y` are broadcast compatible. Args: shape_x: A `TensorShape` shape_y: A `TensorShape` Returns: True if a shape exists that both `shape_x` and `shape_y` can be broadcasted to. False otherwise.
(shape_x, shape_y)
| 560 | |
| 561 | |
| 562 | def is_broadcast_compatible(shape_x, shape_y): |
| 563 | """Returns True if `shape_x` and `shape_y` are broadcast compatible. |
| 564 | |
| 565 | Args: |
| 566 | shape_x: A `TensorShape` |
| 567 | shape_y: A `TensorShape` |
| 568 | |
| 569 | Returns: |
| 570 | True if a shape exists that both `shape_x` and `shape_y` can be broadcasted |
| 571 | to. False otherwise. |
| 572 | """ |
| 573 | if shape_x.ndims is None or shape_y.ndims is None: |
| 574 | return False |
| 575 | return _broadcast_shape_helper(shape_x, shape_y) is not None |
| 576 | |
| 577 | |
| 578 | def broadcast_shape(shape_x, shape_y): |
nothing calls this directly
no test coverage detected