最简单的方法, 使用 NumPy 提供的 array() 函数直接将 Python 数组转换为 ndarray 数组,array() 接受一切序列类型的对象,例如将一个列表转换成 ndarray 数组!