I want to combine two arrays: one with some NaN values and another with all integer values. I want to replace NaN with the corresponding value from the array containing all integer values. I want to use list comprehension for merging two arrays. How can I use "if else" with list comprehension?
E.g.
a=[1,2,3,4,5,6]
b=[11, np.nan, 13,np.nan, np.nan,16]
result=[11, 2, 13, 4, 5, 16]