MCPcopy Create free account
hub / github.com/activeloopai/deeplake / vstacked_array

Method vstacked_array

cpp/nd/impl/stacked_array.hpp:48–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

46{
47public:
48 vstacked_array(array a1, array a2)
49 : vstacked_array_base(std::move(a1), std::move(a2))
50 {
51 ASSERT(a1_.dtype() == a2_.dtype());
52 auto a1_shape = a1_.shape();
53 auto s1 = std::span<const icm::shape::value_type>(a1_shape.data() + 1, a1_shape.data() + a1_shape.size());
54 auto a2_shape = a2_.shape();
55 ASSERT(shapes_equal(
56 s1, std::span<const icm::shape::value_type>(a2_shape.data() + 1, a2_shape.data() + a2_shape.size())));
57 icm::small_vector<icm::shape::value_type> s{a1_.size() + a2_.size()};
58 s.insert(s.end(), s1.begin(), s1.end());
59
60 shape_ = icm::shape(s);
61 }
62
63 enum dtype dtype() const
64 {

Callers

nothing calls this directly

Calls 9

shapes_equalFunction · 0.85
shapeClass · 0.85
dtypeMethod · 0.45
shapeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected