np.squeeze()函数

it2023-06-22  71

numpy.squeeze(a,axis = None),其中:

a:输入的数组;axis:指定需要删除的维度,但是指定的维度必须为单维度,否则将会报错(axis的取值可为None 或 int 或 tuple of ints, 可选。若axis为空,则删除所有单维度的条目);会将运行结果以数组形式返回,并且不改变原数组。转载自https://blog.csdn.net/MachineLearner/article/details/104333726?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param
最新回复(0)