I have a matrix df, and I am trying to fill my last columns by the ratio of 2 other columns like this:
df.col(0) = df.col(1).rowwise() / (df.col(1) + df.col(2));
Bu I get an error:
error: no type named ‘type’ in ‘struct Eigen::internal::promote_scalar_arg<double, Eigen::Replicate<Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op<double, double>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true>, const Eigen::Block<Eigen::Matrix<double, -1, -1>, -1, 1, true> >, -1, 1>, false>’
I do not understand what’s wrong here. Anyone knows please?