Course1 week2 excercise 6 ..I m not able to figure out why one of the test case is failing

{moderator edit - solution code removed}

here is the output
normalizeRows(x) = [[0. 0.4472136 0.70710678]
[1. 0.89442719 0.70710678]]
Error: Wrong output
2 Tests passed
1 Tests failed

AssertionError Traceback (most recent call last)
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))

AssertionError: Not all tests were passed for normalize_rows. Check your equations and avoid using global variables inside the function.

Your “axis” value is wrong. You want to normalize the rows. The means you need to compute the norm “across the columns”. If you look at your output matrix, it’s the columns that have length one. Here’s the correct answer:

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

thanks now it is fixed