diff --git a/src/include/multi_array.cc.h b/src/include/multi_array.cc.h index 55af2c7..e4c5d92 100644 --- a/src/include/multi_array.cc.h +++ b/src/include/multi_array.cc.h @@ -219,7 +219,10 @@ namespace MultiArrayTools } else { assert( PackNum::checkIfSameInstance( MAB::mRange->space(), in.mRange->space() ) ); - std::transform(mCont.begin(), mCont.end(), in.mCont.begin(), mCont.begin(), std::plus()); + for(size_t i = 0; i != size(); ++i){ + mCont[i] += in.mCont[i]; + } + //std::transform(mCont.begin(), mCont.end(), in.mCont.begin(), mCont.begin(), std::plus()); } return *this; } @@ -232,7 +235,10 @@ namespace MultiArrayTools } else { assert( PackNum::checkIfSameInstance( MAB::mRange->space(), in.mRange->space() ) ); - std::transform(mCont.begin(), mCont.end(), in.mCont.begin(), mCont.begin(), std::minus()); + for(size_t i = 0; i != size(); ++i){ + mCont[i] -= in.mCont[i]; + } +//std::transform(mCont.begin(), mCont.end(), in.mCont.begin(), mCont.begin(), std::minus()); } return *this; }