All Courses

while creating array range getting error no name not found

By Sde221876@gmail.com, 3 months ago
  • Bookmark
0

while creating array range getting error no name not found

Errror
Name not found
Nameerrror :
Numpys
'np' is not defined
2 Answers
0
Hitendradixit18@gmail.com

import numpy as np

0
Goutamp777

The error message "NameError: name 'np' is not defined" means that the numpy library, which is usually imported using the alias "np", has not been imported in the current script. To fix the error, you need to add the line "import numpy as np" at the beginning of the script, before using any numpy functions or objects.

Your Answer

Webinars

Live Masterclass on : "How Machine Get Trained in Machine Learning?"

Mar 30th (7:00 PM) 516 Registered
More webinars

Related Discussions

Running random forest algorithm with one variable

View More