A sequence of [1+0j, -1+0j, 1+0j, -1+0j, ...] with length `length`.
(length)
| 252 | _math_ops.cast(length, _dtypes.complex64)) |
| 253 | |
| 254 | def _ymask(length): |
| 255 | """A sequence of [1+0j, -1+0j, 1+0j, -1+0j, ...] with length `length`.""" |
| 256 | return _math_ops.cast(1 - 2 * (_math_ops.range(length) % 2), |
| 257 | _dtypes.complex64) |
| 258 | |
| 259 | y0 = grad[..., 0:1] |
| 260 | if rank == 1: |