Error with execise

Tell us what’s happening:
Describe your issue in detail here.
When i execute exercise about Numpy in Python then i alway recieve error “test_calculate_with_few_digits
self.assertRaisesRegex(ValueError, “List must contain nine numbers.”, mean_var_std.calculate, [2,6,2,8,4,0,1,])
AssertionError: ValueError not raised by calculate”

I don’t know what i wrong

Your code so far

def calculate(list):
if len(list) == 9:
# arr=np.array(list)
arr=np.reshape(list,[3,3]).tolist()
#Mean
v_mean=([np.mean(arr,axis=0).tolist(), np.mean(arr,axis=1).tolist(),np.mean(arr).tolist()])
#Variance
v_variance=([np.var(arr,axis=0).tolist(), np.var(arr,axis=1).tolist(), np.var(arr).tolist()])
#Standard Deviation
v_standard = ([np.std(arr,axis=0).tolist(), np.std(arr, axis=1).tolist(), np.std(arr).tolist()])
#Max
v_max = ([np.max(arr,axis=0).tolist(), np.max(arr, axis=1).tolist(), np.max(arr).tolist()])
#Min
v_min = ([np.min(arr,axis=0).tolist(), np.min(arr, axis=1).tolist(), np.min(arr).tolist()])
#Min
v_sum = ([np.sum(arr,axis=0).tolist(), np.sum(arr, axis=1).tolist(), np.sum(arr).tolist()])
v_dict ={
‘mean’: v_mean,
‘variance’:v_variance,
‘standard deviation’:v_standard,
‘max’:v_max,
‘min’:v_min,
‘sum’:v_sum
}
return v_dict
else:
ValueError (“List must contain nine numbers.”)
return 0

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36

Challenge: Mean-Variance-Standard Deviation Calculator

Link to the challenge:

Exceptions in python are raised with raise keyword.

thanks Sanity. The problem solved.