Registered Member
|
Hey,
im completely new to eigen but love it, but got some problem containing nan/inf values. Is there a way to remove these values from a Vector ? Or a simple way do ignore these values ? If i would do a correlation, I only want to look at samples where both! are not nan/inf, the rest should be ignored. Hopefully this wasn't answer in the board Best regards Robstr |
Moderator
|
You rather see how to avoid generating them in the first place. Anyway, in the devel branch, you can replace them (e.g., to 0) as follows:
VectorXd A; A = (A.array().isfinite()).select(A,0); |
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]