import numpy as np np.set_printoptions(precision=2, suppress=True) scores = np.array( [ [72.0, 75.0, 79.0], [80.0, 82.0, 88.0], [68.0, 74.0, 77.0], [88.0, 93.0, 96.0], ] ) scores_with_missing = scores.copy() scores_with_missing[1, 2] = np.nan print("dataset shape:", scores.shape) print("overall mean:", scores.mean()) print("overall median:", np.median(scores)) print("population std:", round(float(scores.std()), 2)) print("sample std:", round(float(scores.std(ddof=1)), 2)) print("column means:", scores.mean(axis=0)) print("column percentiles:") print(np.percentile(scores, [25, 50, 75], axis=0)) print("row means with NaN ignored:", np.nanmean(scores_with_missing, axis=1)) print("ordinary mean with NaN:", np.mean(scores_with_missing))