Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
正如标题中所写,如何使用 complex128 创建矩阵的实例?以下的复杂等价物是什么?
matrix := mat.NewDense(2, 2, []float64{0, 0, 0, 3})
我怎么能写这样的东西?
Matrix := mat.NewDense(2, 2, []complex128{0, 0, 0, 3i})
Gonum mat 包目前不支持 complex128 值。这是我们正在努力的事情。
现在,Gonum 支持复杂矩阵。
你可以做一个这样的:
matrix := mat.NewCDense(2, 2, []complex128{0, 0, 0, 3i})