A complex64 array of re's shape from float32 parts of that shape. Assembling it as re + im * 1j turns an infinite part into NaN — the product computes inf * 0 for the other lane, so complex(inf, inf) answered (nan + inf j) and a scatter-add of (1 + inf j) did too. A complex64 is two adjacent float32s, so the parts are interleaved and the pairs reinterpreted: no arithmetic touches either one.