mean_data is a nested list, in Python accessing a nested list cannot be done by multi-dimensional slicing, i.e.:
mean_data[1,2], instead one would write
This is because
mean_data is a list. Further indexing is done recursively – since
mean_data is a list,
mean_data is the first index of that list.
mean_data[:] does not work because
The solution is to replace the array ,or import the original data, as follows:
mean_data = np.array(mean_data)
numpy arrays (like MATLAB arrays and unlike nested lists) support multi-dimensional slicing with tuples.