MCPcopy Index your code
hub / github.com/RustPython/RustPython / getitem_by_multi_idx

Method getitem_by_multi_idx

crates/vm/src/builtins/memory.rs:165–169  ·  view source on GitHub ↗
(&self, indexes: &[isize], vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

163 }
164
165 fn getitem_by_multi_idx(&self, indexes: &[isize], vm: &VirtualMachine) -> PyResult {
166 let pos = self.pos_from_multi_index(indexes, vm)?;
167 let bytes = self.buffer.obj_bytes();
168 format_unpack(&self.format_spec, &bytes[pos..pos + self.desc.itemsize], vm)
169 }
170
171 fn setitem_by_idx(&self, i: isize, value: PyObjectRef, vm: &VirtualMachine) -> PyResult<()> {
172 if self.desc.ndim() != 1 {

Callers 1

__getitem__Method · 0.80

Calls 3

format_unpackFunction · 0.85
pos_from_multi_indexMethod · 0.80
obj_bytesMethod · 0.45

Tested by

no test coverage detected