I have two list like
l1 = [np.nan, 54, 40, 71, 20, 27, 33, 38, 104, 36, 13]
l2 = [64, 50, 81, 30, 37, 43, 48, 204, 46, 23, np.nan]
how can I do an elementwise multiplication ignoring the nans.
So to return
res = [ nan, 2700, 3240, 2130, 740, 1161, 1584, ......, nan]
I found one way of doing it via pandas
res = pd.Series(l1).multiply(pd.Series(l2), fill_value = np.nan)
but can this be done without converting it to pd