Skip to content

Commit 0611523

Browse files
committed
cbegin
1 parent 9a4ae92 commit 0611523

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

2017-04-09-PyDataAmsterdam-xtensor/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ <h3>Authoring Python extensions</h3>
960960
{
961961
auto sines = xt::sin(m);
962962
// 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);
964964
}
965965

966966
PYBIND11_PLUGIN(xtensor_python_test)

2017-04-26-budapest.py-xtensor/src/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ <h3>Authoring Python extensions (1/2)</h3>
885885
{
886886
auto sines = xt::sin(m);
887887
// 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);
889889
}
890890

891891
PYBIND11_PLUGIN(xtensor_python_test)

0 commit comments

Comments
 (0)