از متد chip کلاس tensor استفاده کنید پارامتر اول موقعیت و پارامتر دوم بعد را مشخص می کنه.
Eigen::Tensor<int, 2> a(4, 3);
a.setValues({{0, 100, 200}, {300, 400, 500},
{600, 700, 800}, {900, 1000, 1100}});
Eigen::Tensor<int, 1> row_3 = a.chip(2, 0);
Eigen::Tensor<int, 1> col_2 = a.chip(1, 1);
cout << "a" << endl << a << endl;
=>
a
0 100 200
300 400 500
600 700 800
900 1000 1100
cout << "row_3" << endl << row_3 << endl;
=>
row_3
600 700 800
cout << "col_2" << endl << col_2 << endl;
=>
col_2
100 400 700 1000