Which code converts the Python list [1, 2, 3, 4] into a NumPy array?, np.array([1, 2, 3, 4]), np.arange([1, 2, 3, 4]), np.full([1, 2, 3, 4]), Which code creates a 2D array with 2 rows and 3 columns?, np.array([[1, 2, 3], [4, 5, 6]]), np.array([1, 2, 3, 4, 5, 6]), np.arange(2, 3), Which code creates a 3 × 4 placeholder array filled with zeros?, np.zeros((3, 4)), np.ones((3, 4)), np.full((3, 4), 1), Which code creates a 2 × 3 array filled with ones?, np.ones((2, 3)), np.zeros((2, 3)), np.full((2, 3), 0), Which code creates the values [0, 2, 4, 6, 8]?, np.arange(0, 10, 2), np.linspace(0, 10, 2), np.arange(0, 8, 10), Which code creates 5 evenly spaced values from 0 to 1?, np.linspace(0, 1, 5), np.arange(0, 1, 5), np.full((0, 1), 5), Which code creates a 2 × 3 array where every value is 5?, np.full((2, 3), 5), np.ones((2, 3, 5)), np.array((2, 3), 5), Which code creates a 2 × 2 array of random decimal values between 0 and 1?, np.random.rand(2, 2), np.full((2, 2), 1), np.arange(2, 2)

Creating NumPy Arrays

Leaderboard

Visual style

Options

Switch template

Continue editing: ?