Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Python Introduction to NumPy Array Programming Routines in Action

NameError: name 'float16' is not defined

Hello,

NameError: name 'float16' is not defined

Does anyone know why Craig's NumPy code (between 2:00 and 3:00 of the Routines in Action video) has his array returning dtype=float16?

I had to set my final parameter as such:

students_gpas = np.array([[3.3, 3.3, 3.3], [3.3, 3.3, 3.3], [3.3, 3.3, 3.3]], dtype=float)

If I set it to float16, error occurs. Please assist if you can, thank you :)

oh, i found the answer in my notes... one would type dtype=np.float16 or dtype=np.uint8 as a parameter.

hooray :|

1 Answer

oh, i found the answer in my notes... one would type dtype=np.float16 or dtype=np.uint8 as a parameter.

hooray :|