MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/Imath / getitem

Method getitem

src/python/PyImath/PyImathFixedVArray.cpp:308–314  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306// this must have a call policy of return_internal_reference
307template <class T>
308FixedArray<T>
309FixedVArray<T>::getitem (Py_ssize_t index)
310{
311 const size_t i = canonical_index (index, _length);
312 std::vector<T>& data = _ptr[(_indices ? raw_ptr_index(i) : i) * _stride];
313 return FixedArray<T>(data.empty() ? nullptr : &data[0], data.size(), 1, _writable);
314}
315
316template <class T>
317FixedVArray<T>

Callers

nothing calls this directly

Calls 3

canonical_indexFunction · 0.85
sizeMethod · 0.45
raw_ptr_indexMethod · 0.45

Tested by

no test coverage detected