Mean-Variance-Standard Deviation Calculator Problem TESTS

Tell us what’s happening:
Describe your issue in detail here.
Hello, I’m having a little problem with the run tests.
But I think that the problem is in the tests and not in my code. I attached the problem that I’m getting.

Your code so far

======================================================================
ERROR: test_calculate (test_module.UnitTests)

Traceback (most recent call last):
File “/home/runner/boilerplate-mean-variance-standard-deviation-calculator/test_module.py”, line 10, in test_calculate
self.assertAlmostEqual(actual, expected, “Expected different output when calling ‘calculate()’ with ‘[2,6,2,8,4,0,1,5,7]’”)
File “/usr/lib/python3.8/unittest/case.py”, line 943, in assertAlmostEqual
diff = abs(first - second)
TypeError: unsupported operand type(s) for -: ‘dict’ and ‘dict’

======================================================================
ERROR: test_calculate2 (test_module.UnitTests)

Traceback (most recent call last):
File “/home/runner/boilerplate-mean-variance-standard-deviation-calculator/test_module.py”, line 15, in test_calculate2
self.assertAlmostEqual(actual, expected, “Expected different output when calling ‘calculate()’ with ‘[9,1,5,3,3,3,2,9,0]’”)
File “/usr/lib/python3.8/unittest/case.py”, line 943, in assertAlmostEqual
diff = abs(first - second)
TypeError: unsupported operand type(s) for -: ‘dict’ and ‘dict’


Your browser information:

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

Challenge: Mean-Variance-Standard Deviation Calculator

Link to the challenge:

Can you paste here the implementation of calculate()?

This is my code in calculate():
def calculate(list):
calculations = {}
if len(list) != 9:
raise ValueError(“List must contain nine numbers.”)
else:
matriz = np.array(list).reshape(3,3)
#print(matriz)
calculations[“means”]=[np.mean(matriz,axis=0).tolist(),np.mean(matriz,axis=1).tolist(),np.mean(matriz)]
calculations[“variance”]=[np.var(matriz,axis=0).tolist(),np.var(matriz,axis=1).tolist(),np.var(matriz)]
calculations[‘standard deviation’]=[np.std(matriz,axis=0).tolist(),np.std(matriz,axis=1).tolist(),np.std(matriz)]
calculations[‘max’]=[np.max(matriz,axis=0).tolist(),np.max(matriz,axis=1).tolist(),np.max(matriz)]
calculations[‘min’]=[np.min(matriz,axis=0).tolist(),np.min(matriz,axis=1).tolist(),np.min(matriz)]
calculations[‘sum’]=[np.sum(matriz,axis=0).tolist(),np.sum(matriz,axis=1).tolist(),np.sum(matriz)]
return calculations