3 - Understanding NumPy for Machine Learning
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
Practice Questions
Test your understanding with targeted questions
What is the command to create a 2D NumPy array with values [[1, 2], [3, 4]]?
💡 Hint: Think about the syntax `np.array()`.
What does np.zeros((3, 3)) do?
💡 Hint: Recall what zeros represent in initialization.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What does NumPy stand for?
💡 Hint: Think about the focus of this library.
True or False: NumPy arrays are slower than Python lists in numerical operations.
💡 Hint: Think about why we use NumPy in machine learning.
2 more questions available
Challenge Problems
Push your limits with advanced challenges
You are given an array of shape (3, 4). Reshape it into a shape of (2, 6). How do you do it, and what does the resulting array look like?
💡 Hint: Remember, the total number of elements must stay constant.
Implement a Python function using NumPy to normalise an array (subtract the mean and divide by the standard deviation). What will be the general structure of your function?
💡 Hint: Think about mean and std calculations, and how they relate to normalizing data.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.