Skip to content

Commit 72dacee

Browse files
committed
run pre-commit
1 parent 995896b commit 72dacee

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

include/xtensor/xbuilder.hpp

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -542,15 +542,20 @@ namespace xt
542542
size_t offset = 0;
543543
const size_t end = arr.dimension();
544544
bool after_axis = false;
545-
for(size_t i = 0; i < end; i++)
545+
for (size_t i = 0; i < end; i++)
546546
{
547-
if(i == axis)
547+
if (i == axis)
548548
{
549549
after_axis = true;
550550
}
551551
const auto& shape = arr.shape();
552-
const size_t stride = std::accumulate(shape.begin() + i + 1, shape.end(), 1, std::multiplies<size_t>());
553-
const auto len = (*(first + i + after_axis));
552+
const size_t stride = std::accumulate(
553+
shape.begin() + i + 1,
554+
shape.end(),
555+
1,
556+
std::multiplies<size_t>()
557+
);
558+
const auto len = (*(first + i + after_axis));
554559
offset += len * stride;
555560
}
556561
const auto element = arr.begin() + offset;
@@ -565,6 +570,7 @@ namespace xt
565570
class vstack_access
566571
{
567572
public:
573+
568574
using tuple_type = std::tuple<CT...>;
569575
using size_type = std::size_t;
570576
using value_type = xtl::promote_type_t<typename std::decay_t<CT>::value_type...>;
@@ -581,9 +587,11 @@ namespace xt
581587
return concatonate.access(t, axis, first, last);
582588
}
583589
}
590+
584591
private:
592+
585593
concatenate_access<CT...> concatonate;
586-
stack_access<CT...> stack;
594+
stack_access<CT...> stack;
587595
};
588596

589597
template <template <class...> class F, class... CT>
@@ -616,6 +624,7 @@ namespace xt
616624
}
617625

618626
private:
627+
619628
F<CT...> access_method;
620629
tuple_type m_t;
621630
size_type m_axis;

0 commit comments

Comments
 (0)