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
转载请注明原文地址:https://tech.qufami.com/read-8491.html