# Normalization problem

I am getting assertion error while solving normalization problem in week 2. I have not been able to figure it out

1 Like

Weâ€™ll need a bit more context to understand what the issue is here. The best way to proceed would be to â€ścopy/pasteâ€ť the whole exception trace that you are getting when you run whatever cell it is that is failing. Please donâ€™t post the source code: just the output of running the cell. From that we can usually give some direction about where the problem is.

in
3 print("normalizeRows(x) = " + str(normalize_rows(x)))
4
----> 5 normalizeRows_test(normalize_rows)

~/work/release/W2A1/public_tests.py in normalizeRows_test(target)
162 ]
163
â†’ 164 test(test_cases, target)
165
166 def softmax_test(target):

~/work/release/W2A1/test_utils.py in test(test_cases, target)
24 print(â€™\033[92mâ€™, success," Tests passed")
25 print(â€™\033[91mâ€™, len(test_cases) - success, " Tests failed")
â€”> 26 raise AssertionError(â€śNot all tests were passed for {}. Check your equations and avoid using global variables inside the function.â€ť.format(target.name))

Ok, that says that the output values are incorrect. Please have another look at the instructions and also show us your output values. Hereâ€™s what I get from that section:

``````normalizeRows(x) = [[0.         0.6        0.8       ]
[0.13736056 0.82416338 0.54944226]]
All tests passed.
``````

Also note that they literally write out the python code in the instructions for you to do the norm calculation. Then all you need to do is divide x by the norm.