Here, you have declared contents for your array that don't fit it. There is no declaration of your array.If we assume it to be one dimensional and the program is opposing to treat it like a 2 dimensional.
So, check your declarations whether they are correct or not and also test the code by printing the values after you've set them to double check they are what you intend them to be.
To Learn what is data science and how to be a data scientist visit the data scientist course by Intellipaat.