Programming Assignment: Predict function

Testing the “predict” code throws the following error message.

NameError Traceback (most recent call last)
in
1 # Test your predict code
----> 2 np.random.seed(1)
3 tmp_w = np.random.randn(2)
4 tmp_b = 0.3
5 tmp_X = np.random.randn(4, 2) - 0.5

NameError: name ‘np’ is not defined

Isn’t np a standard numpi library function? Any help will be much appreciated

Hello @George_Tzotzos

Welcome to the community.

Could you check if you have run the cell that has “import numpy as np”? Do keep in mind that you should run all the preceding cells

Many thanks for the prompt and useful reply and apologies for my oversight.

You are most welcome @George_Tzotzos :blush: - Happy learning!