Cleanest way to replace np.array value with np.nan by user defined index

Published --