import numpy as np # 将二维数据降成1维 num = [(2.5, 2.4), (0.5, 0.7), (2.2, 2.9), (1.9, 2.2), (3.1, 3.0), (2.3, 2.7), (2, 1.6), (1, 1.1), (1.5, 1.6), (1.1, 0.9)] num_array = np.array(num) n1_avg, n2_avg = np.mean(num_array[:, 0]), np.mean(num_array[:, 1]) #…