Last answered:

11 Jul 2024

Posted on:

10 Jul 2024

0

loading the data

I am trying to load data, but I keep getting attribute error

I used the same code you used.

AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:

3 answers ( 0 marked as helpful)
Instructor
Posted on:

10 Jul 2024

0

Hi Doaa!

Great to have you in this course and thanks for reaching out!

Can you please provide a screenshot of your code? Where do you use NumPy? Here, we load the data using pandas. 

This code should work without any issues related to np.float. If you encounter further issues related to NumPy in other parts of your code, replace np.float with float or np.float64 as suggested.

Best,

Ivan 

Posted on:

11 Jul 2024

0

Instructor
Posted on:

11 Jul 2024

0

Hi Doaa!

Can you please provide the end of the error message as well?

Best,

Ivan

Submit an answer