Error-
Describe your issue in detail here.
When I run my code, it produces an very long error message after installing numpy.
ChefBuild Error
Error Compiling Cython file
How can I get rid of this error?
My Code:
import numpy as np
def calculate(list):
if len(list) != 9:
raise ValueError(“List must contain nine numbers.”)
else:
a=np.reshape(list,(3,3))
m=([np.mean(a,axis=0),np.mean(a,axis=1),np.mean(list)])
v=([np.var(a,axis=0),np.var(a,axis=1),np.var(list)])
s=([np.std(a,axis=0),np.std(a,axis=1),np.std(list)])
maxi=([np.max(a,axis=0),np.max(a,axis=1),np.max(list)])
mini=([np.min(a,axis=0),np.min(a,axis=1),np.min(list)])
ss=([np.sum(a,axis=0),np.sum(a,axis=1),np.sum(list)])
l={‘mean’:m,‘varainace’:v,‘standard deviation’:s,‘max’:maxi,‘min’:mini,‘sum’:ss}
return l
Browser:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36
Challenge Information:
Data Analysis with Python Projects – Mean-Variance-Standard Deviation Calculator
You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.