Return true if the object is iterable.
(obj)
| 30 | |
| 31 | |
| 32 | def is_iterable(obj): |
| 33 | """Return true if the object is iterable.""" |
| 34 | if isinstance(obj, ops.Tensor): |
| 35 | return False |
| 36 | try: |
| 37 | _ = iter(obj) |
| 38 | except Exception: # pylint: disable=broad-except |
| 39 | return False |
| 40 | return True |
| 41 | |
| 42 | |
| 43 | def concatenate_unique(la, lb): |
no outgoing calls
no test coverage detected