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

Method get

cpp/nd/impl/empty_array.hpp:46–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 }
45
46 array get(int64_t) const
47 {
48 if (shape_.size() == 1) {
49 if constexpr (base::arithmetic<value_type>) {
50 return array(value_type());
51 } else if constexpr (std::is_same_v<value_type, nd::dict>) {
52 return adapt(nd::dict());
53 } else if constexpr (std::is_same_v<value_type, std::string_view>) {
54 return adapt(std::string());
55 } else {
56 ASSERT(false);
57 }
58 }
59 return array(empty_array<value_type>(icm::shape(shape_.begin() + 1, shape_.end())));
60 }
61
62 constexpr bool is_dynamic() const noexcept
63 {

Callers

nothing calls this directly

Calls 7

adaptFunction · 0.85
shapeClass · 0.85
arrayClass · 0.70
dictClass · 0.70
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected