aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar jenswehner <jenswehner@gmail.com>2021-06-16 11:45:06 +0200
committerGravatar jenswehner <jenswehner@gmail.com>2021-06-16 11:45:06 +0200
commit175f0cc1e9875e9d5e2e1cb58ab57d5b0b078a0d (patch)
tree5c51b12b0d4c9bb4052593006847fff043bbad55
parent9e94c5957000c38a6553552c96a7a27b1fc2860d (diff)
changed documentation to make example compile
-rw-r--r--unsupported/Eigen/CXX11/src/Tensor/README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/unsupported/Eigen/CXX11/src/Tensor/README.md b/unsupported/Eigen/CXX11/src/Tensor/README.md
index 9b6f14204..0ef212a51 100644
--- a/unsupported/Eigen/CXX11/src/Tensor/README.md
+++ b/unsupported/Eigen/CXX11/src/Tensor/README.md
@@ -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