0

Name error: name 'x' is not defined

where is my mistake???? help my, please :) https://code.sololearn.com/cpNoG7ZW8MxA/?ref=app

17th Oct 2017, 9:03 AM
Iryna Shevchenko
Iryna Shevchenko - avatar
3 Respostas
+ 3
First you haven't imported numpy as np Second you need to define x = 0 or x = "" import numpy as np def normalizeRows(x): x=np.array([[0,3,4],[1,6,4]]) x_norm=np.linalg.norm(x,ord=2,axis=1,keepdims=True) x=x/x_norm return x x = 0 print("normalizeRows(x)="+ str(normalizeRows(x)))
17th Oct 2017, 10:11 AM
Ferhat Sevim
Ferhat Sevim - avatar
+ 1
many thanks!!! working.....😊😊😊👍👍👍👍
17th Oct 2017, 10:32 AM
Iryna Shevchenko
Iryna Shevchenko - avatar