摘要:
# coding=utf-8 import numpy as np ''' 填充nan的数据,为该列的平均值 ''' def fill_ndarray(t1): for i in range(t1.shape[1]): temp_col = t1[:,i] #取每一列 print(temp_col) nan_num =np.count_... 阅读全文
摘要:
注意点: 阅读全文
摘要:
a = np.array([[11, 12, 13, 14, 15], [16, 17, 18, 19, 20], [21, 22, 23, 24, 25], [26, 27, 28 ,29, 30], [31, 32, 33, 34, 35]]) print(type(a)) # >>><clas 阅读全文
摘要:
# coding=utf-8 import numpy as np import random ############一维数组创建############# #方式一 t1 = np.array([1,2,3],dtype=float) print(t1,t1.dtype,t1.shape) #方式二 t2 = np.array(range(5),dtype=float) print(t... 阅读全文