mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-11 19:29:02 +08:00
changed documentation to make example compile
This commit is contained in:
parent
9e94c59570
commit
175f0cc1e9
@ -1468,9 +1468,9 @@ the input tensor.
|
||||
Eigen::Tensor<int, 2> a(4, 3);
|
||||
a.setValues({{0, 100, 200}, {300, 400, 500},
|
||||
{600, 700, 800}, {900, 1000, 1100}});
|
||||
Eigen::array<int, 2> offsets = {1, 0};
|
||||
Eigen::array<int, 2> extents = {2, 2};
|
||||
Eigen::Tensor<int, 1> slice = a.slice(offsets, extents);
|
||||
Eigen::array<Eigen::Index, 2> offsets = {1, 0};
|
||||
Eigen::array<Eigen::Index, 2> extents = {2, 2};
|
||||
Eigen::Tensor<int, 2> slice = a.slice(offsets, extents);
|
||||
cout << "a" << endl << a << endl;
|
||||
=>
|
||||
a
|
||||
|
Loading…
x
Reference in New Issue
Block a user