Numpy.mean() - TypeError: 'list' object is not callable

Hi @Ishvinder , in the attached image, I am getting an error while retrieving the mean and median for the cric_data file stating that list object is not callable.

Can you please help ?

Hi @arpitgarg2567,
Not sure why is this occuring while usng a numpy array, could be a runtime issue… can you try restarting the session and then run it again?

1 Like

It worked now.

Thanks

Hello @Ishvinder , one more problem I am getting in the NumPy module where it is asked to ‘Find mean for Sachin’s scores based on which quartile India’s scores falls in’ from the given cric_data.tsv file

In the image above, the first line of code, we have computed the percentiles at 25, 50, 75, 100 positions of the india runs. After this, i didn’t get the proper interpretation of code.

Can you please explain ?

In Cell 62,
We are comparing the total runs scored by Indian team in every match with that of the percentiles that we have computed.
As we can see the shape is (4, 225). For instance,
(1, 1) will contain a boolean value, which shows whether India’s total in match number 1 (from the data) is less than the 25th percentile score or not.
Similarly, any other value in indices let’s take (3, 200) will have a boolean value which indicates whether India’s total in match 200 was less than the score computed from 3rd quartile value, which is 273 here.

1 Like