(x)
| 57 | yield p |
| 58 | |
| 59 | def is_fp_tensor(x): |
| 60 | if is_nested(x): |
| 61 | # Fast-fail version of all(is_fp_tensor) |
| 62 | for y in x: |
| 63 | if not is_fp_tensor(y): |
| 64 | return False |
| 65 | return True |
| 66 | return is_tensor_like(x) and is_floating_point(x) |
| 67 | |
| 68 | def is_nested(x): |
| 69 | return isinstance(x, tuple) or isinstance(x, list) |
no test coverage detected