MCPcopy Create free account
hub / github.com/ImageEngine/cortex / convertColumnIndex

Function convertColumnIndex

src/IECorePython/ObjectMatrixBinding.cpp:132–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130}
131
132size_t convertColumnIndex( const ObjectMatrix &m, tuple index )
133{
134 int64_t column = extract<int64_t>( index[1] );
135 if( column < 0 )
136 {
137 column += m.numColumns();
138 }
139 if( column >= (int64_t)m.numColumns() || column < 0 )
140 {
141 PyErr_SetString( PyExc_IndexError, "Index out of range" );
142 throw_error_already_set();
143 }
144
145 return column;
146}
147
148IECore::ObjectPtr getItem( const ObjectMatrix &m, tuple index )
149{

Callers 2

getItemFunction · 0.85
setItemFunction · 0.85

Calls 1

numColumnsMethod · 0.80

Tested by

no test coverage detected