Created
November 20, 2022 17:07
-
-
Save tuantmb/d86b748d15d41a822fa3de9ddaa50a5f to your computer and use it in GitHub Desktop.
just test numpy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n, p = [int(x) for x in input().split()] | |
import numpy as np | |
output = np.array([]) | |
for i in range(n): | |
values = np.array([float(y) for y in input().split()][:p]) | |
// np.array.mean() vs round(np.array.sum(), 2) --> number of decimal values after the point | |
s = values.sum() | |
m = round(s / p, 2) | |
output = np.append(output, m) | |
print(output) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment