Tell us what’s happening:
Describe your issue in detail here.
I made a list, converted it into a 3x3 matrix and calculated the mean as below
mean = [(np.mean(a, axis=0)), (np.mean(a, axis=1)), (np.mean(a))]
When I print mean, the values if they are whole numbers show up as 4. not 4.0 and I’m not sure how to change it.
I am coding on pycharm instead of on jupyter notebook
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
Challenge: Data Analysis with Python Projects - Mean-Variance-Standard Deviation Calculator
Sorry for not providing enough information.
Yes currently it is coming out as an array and I am trying to change it to a list but not exactly sure how in the code above to convert it to a list. I’ve tried
mean = mean.tolist() but returns an error