(func, shape, meta=(), *args, **kwargs)
| 134 | |
| 135 | @curry |
| 136 | def _broadcast_trick_inner(func, shape, meta=(), *args, **kwargs): |
| 137 | # cupy-specific hack. numpy is happy with hardcoded shape=(). |
| 138 | null_shape = () if shape == () else 1 |
| 139 | |
| 140 | return np.broadcast_to(func(meta, *args, shape=null_shape, **kwargs), shape) |
| 141 | |
| 142 | |
| 143 | def broadcast_trick(func): |
no test coverage detected
searching dependent graphs…