python把二维列表转成一维列表 先把列表转成numpy数组,然后使用flatten()函数把数组扁平化。 示例代码如下: # !/usr/bin/python # -*- coding: utf-8 -*- """ @contact: 微信 1257309054 @file: waveform_feature.py @time: 2022/11/2 13:04 @author: LDC """ import numpy as np a = [ [1, 2,