![]() Registered Member ![]()
|
Hi, I'm using ArrayXd in my code and I found the resize() function didn't what I think it should do. For simplicity, I'm showing this problem with the following code.
The output was
I would expect "cols=4" however. If I use MatrixXd instead of ArrayXd, cols() will return 4. My understanding is that Matrix and Array should behave the same here, but no. Is it designed to be like this or a bug? |
![]() Registered Member ![]()
|
Well, solved the problem.
![]() VectorXd -> ArrayXd MatrixXd -> ArrayXXd |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]