Hello all,
I have an issue runing this code, it is under exercice 3,
all other tests for this exercice were passed successfully.
Hi @Layan_Yamani,
the use of numpy in this instance is not correct. First of all, if you want to use numpy, you should use ânpâ because you imported it as such. In this case i donât know what exactly you are trying to achieve with putting numpy in the middle. Try to remove it. If you want to convert your array or list to a numpy vector, then you need to use => np.array(predictionâŚ) for example. Hope this helps!
Once you âimport numpy as npâ, after that you refer to it as ânp.â followed by a function name.
Also be sure you run all of the cells starting at the top of the notebook.
I came here looking for this numpy().astype(int) phrase - I had the same and it was in the Practice Lab in a locked cell. I tried to upgrade the Lab but it was the most current. It could be how the notebooks are being distributed currently.
@ramz,
It looks like the fix for this has been checked in - very close to the time you tried upgrading the lab. Please try upgrading one more time. Sorry - you just happened to hit just the wrong timing.
This is what that section should look like now:
Thank you for the quick reply. It didnât bother me as it was obvious but I came here to check if it had been reported already. Good to see it was updated.