+ 1
2 test cases are showing to be incorrect need some help
From data science course, average of rows project: import numpy as np n, p = [int(x) for x in input().split()] elements=np.array([]) elements=elements.reshape((0,p)) for i in range(n): a=[float(x) for x in input().split(" ")] a = np.array(a) a = a.reshape(1,p) elements = np.vstack((elements,a)) print(elements.mean(axis=1))
1 Réponse
+ 6
Can try with round off
Based on the problem, you have to round the mean array to 2 decimal places.