| 126 | } |
| 127 | |
| 128 | nd::array get(int64_t index) const |
| 129 | { |
| 130 | icm::string_map<nd::array> key2arr; |
| 131 | for (auto i = 0; i < header_->keys_.size(); ++i) { |
| 132 | const auto& [key, dt] = header_->keys_[i]; |
| 133 | const auto start = header_->offsets_[i] + header_->data_offset_; |
| 134 | const auto end = header_->offsets_[i + 1] + header_->data_offset_; |
| 135 | auto buffer = data_.chunk(start, end); |
| 136 | key2arr[key] = header_->get(buffer, dt, i); |
| 137 | } |
| 138 | if (header_->version_ < 2U) { |
| 139 | return nd::impl::dict_array(std::move(key2arr), 1).get(index); |
| 140 | } else { |
| 141 | return nd::impl::dict_array(std::move(key2arr), header_->dynamic_rows_[index]).get(index); |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | icm::shape shape() const noexcept |
| 146 | { |
nothing calls this directly
no test coverage detected