| 115 | } |
| 116 | |
| 117 | size_t convertRowIndex( const ObjectMatrix &m, tuple index ) |
| 118 | { |
| 119 | int64_t row = extract<int64_t>( index[0] ); |
| 120 | if( row < 0 ) |
| 121 | { |
| 122 | row += m.numRows(); |
| 123 | } |
| 124 | if( row >= (int64_t)m.numRows() || row < 0 ) |
| 125 | { |
| 126 | PyErr_SetString( PyExc_IndexError, "Index out of range" ); |
| 127 | throw_error_already_set(); |
| 128 | } |
| 129 | return row; |
| 130 | } |
| 131 | |
| 132 | size_t convertColumnIndex( const ObjectMatrix &m, tuple index ) |
| 133 | { |