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?
b=[11, np.nan, 13,np.nan, np.nan,16]
result=[11, 2, 13, 4, 5, 16]