BIG阳
解决了。mat.NewVecDense(...)返回一个*mat.VecDense,它实现了一个方法func MulVec(a mat.Matrix, b mat.Vector)这是验证功能的测试func TestMatrixVectorMul(t *testing.T) { a := mat.NewDense(3, 3, []float64{ 1, 2, 3, 4, 5, 6, 7, 8, 9, }) b := mat.NewVecDense(3, []float64{ 1, 2, 3, }) actual := make([]float64, 3) c := mat.NewVecDense(3, actual) // this was the method, I was looking for. c.MulVec(a, b) expected := []float64{14, 32, 50} assert.Equal(t, expected, actual)}