I have multiple array that for those I calculate a linear regression, but sometimes it gives me 0/0 values which gives me a 'NaN'. I know that to convert an array where there are numbers that are NaN you can convert them using numpy.nan_to_num. But what if I want to convert a single value that's not in a array, but a result of a linear regression calculation?
EDIT: It's not a duplicate question (convert nan value to zero ) since I'm referring to a item/result that is not in a array