My flag for a missing value is 0, so from [0, A, B, 0, 0, C, 0] I want [0, A, B, B, B, C, C] (if no previous non-missing value exists, then just leave as 0).
I’m using the CUDA Thrust library, and was wondering if there’s a quick way of doing this without looping though each element.
Many thanks.
seems work well.
output: