4.1 - NumPy (Numerical Python)
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
Create a 1D NumPy array containing numbers 1 to 5.
💡 Hint: Use `np.array` to create an array.
What is the output of np.array([1, 2, 3]).mean()?
💡 Hint: Consider what the mean of {1, 2, 3} is.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What does the command np.array([5, 10, 15]) do?
💡 Hint: Consider what the prefix 'np' indicates.
True or False: An ndarray can contain elements of different data types.
💡 Hint: Think about the structure of data in NumPy.
2 more questions available
Challenge Problems
Push your limits with advanced challenges
Given two NumPy arrays, a = np.array([1, 2, 3]) and b = np.array([4, 5, 6]), write a function that returns their element-wise product.
💡 Hint: Think of how NumPy allows operations on arrays directly.
Create a 2D NumPy array representing a dataset of 3 different plants with 4 features each, and compute the standard deviation of each feature.
💡 Hint: Take advantage of NumPy’s abilities to handle multidimensional data.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.