YDOOK:Python 使用 numpy 定义复数数组 dtype = complex

tech2022-12-27  116

Python 使用 numpy 定义复数数组 dtype = complex

import numpy as np a = np.array([1, 2, 3], dtype=complex) print(a) print(type(a))

结果

[1 2 3] <class 'numpy.ndarray'> [[[1 2 3]]] <class 'numpy.ndarray'> Process finished with exit code 0
最新回复(0)