I have a numpy array called heart_rate of shape (1181,) and dtype float.
In my data there is occasionally the word None.
I would like to get rid of this and replace it with the average of the data values.
When I try and run the following code:
inds = np.where(np.isnan(heart_rate))
But I am getting TypeError: ufunc 'isnan' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''