NumPy - Fundamentals
Identify the error in this code:
import numpy as np lst = [1, 2, 3] arr = np.array(lst) print(arr + [1, 2])
import numpy as np lst = [1, 2, 3] arr = np.array(lst) print(arr + [1, 2])
arr has shape (3,), list [1, 2] has length 2.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions