Unsupported operand type for mean variance standard deviation challenge

Tell us what’s happening:
I have been searching for this issue online and I cannot seem to find any solution. Relatively new to coding and any advice will help!

Your code so far
https://replit.com/join/fmqrvaswps-garethchay

Your browser information:

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

Challenge: Mean-Variance-Standard Deviation Calculator

Link to the challenge:

That’s a tricky error, as it just means the assertion failed which can have various reasons.

As of here, if you check the example output from the Readme and your output for the same data - you’ll notice your order in the output is different.
If I fix that, it runs without problem.

may i know how do u fix that ?

Basically, you switched axis1 and axis2 from the example. Meaning you have to switch the results for rows and columns in the lists for your final output.

It would be more obvious if you used the Numpy-methods to their full extend. You can both define a 3x3 shape in it and then utilize the axis-argument for “mean()” and so on…

You can fix the error by switching and then later look more into Numpy to optimize the code, if you’d like :wink:

thank you so much! i appreciate the help

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.