I am trying to find the outlier value at specific indices and passing the following code, what should I do?
array2=([26, 23, 26, 24, 15, 213, 19, 18, 17, 170, 20, 21, 16, 21, 19, 23, 21, 17, 19, 17, 28, 20, 27, 122, 23])
z_score_values=np.abs(zscore(array2))
z_score_values
outliers_index= np.where(z_score_values >=2)[0]
outliers_list = array2[outliers_index]
outliers_index
It results into following error:
TypeError: only integer scalar arrays can be converted to a scalar index