[go: up one dir, main page]

Matrix expressions cannot be used to initialize ArrayXd

Submitted by Yixuan Qiu

Assigned to Nobody

Link to original bugzilla bug (#1343)
Version: 3.3 (current stable)

Description

Hi All,

I just found an issue that newly appeared in the 3.3 version. The problem is that a matrix-vector multiplication cannot be used to initialize an ArrayXd object. See the minimal example below:

=====================================================================

#include <Eigen/Core>

using Eigen::MatrixXd;
using Eigen::VectorXd;
using Eigen::ArrayXd;

int main()
{
MatrixXd m1 = MatrixXd::Random(10, 10);
VectorXd v1 = VectorXd::Random(10);

ArrayXd a1 = v1;       // This is fine  
ArrayXd a2 = m1 * v1;  // OK on 3.2 but fails on 3.3  
  
return 0;  

}

=====================================================================

OS: Fedora 25 64-bit
Compiler: GCC 6.2/clang 3.8

Thank you.

Best,
Yixuan

Edited by Eigen Bugzilla