File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
2017-04-09-PyDataAmsterdam-xtensor/src
2017-04-26-budapest.py-xtensor/src Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -960,7 +960,7 @@ <h3>Authoring Python extensions</h3>
960
960
{
961
961
auto sines = xt::sin(m);
962
962
// sines does not actually hold any value, which are only computed upon access
963
- return std::accumulate(sines.begin (), sines.end (), 0.0);
963
+ return std::accumulate(sines.cbegin (), sines.cend (), 0.0);
964
964
}
965
965
966
966
PYBIND11_PLUGIN(xtensor_python_test)
Original file line number Diff line number Diff line change @@ -885,7 +885,7 @@ <h3>Authoring Python extensions (1/2)</h3>
885
885
{
886
886
auto sines = xt::sin(m);
887
887
// sines does not actually hold any value, which are only computed upon access
888
- return std::accumulate(sines.begin (), sines.end (), 0.0);
888
+ return std::accumulate(sines.cbegin (), sines.cend (), 0.0);
889
889
}
890
890
891
891
PYBIND11_PLUGIN(xtensor_python_test)
You can’t perform that action at this time.
0 commit comments