Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is the command to create a 2D NumPy array with values [[1, 2], [3, 4]]?
Think about the syntax `np.array()`.
What does np.zeros((3, 3)) do?
Recall what zeros represent in initialization.
What does NumPy stand for?
Think about the focus of this library.
True or False: NumPy arrays are slower than Python lists in numerical operations.
Think about why we use NumPy in machine learning.
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?
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?
Think about mean and std calculations, and how they relate to normalizing data.
6 more questions in this section. Enroll free to practise them all.
Enroll free