NumPy - Aggregation Functions
Which of the following is the correct syntax to sum elements of a numpy array
arr along axis 1?arr along axis 1?axis=1 correctly. np.sum(arr, 1, axis=1) provides multiple values for the axis parameter, which is invalid. np.sum(arr, axis='1') uses a string which is invalid. np.sum(arr, axis=[1]) uses a list which is invalid.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions