| 43 | } |
| 44 | |
| 45 | int get_slice_int(nb::object obj, int default_val) { |
| 46 | if (!obj.is_none()) { |
| 47 | if (!is_index_scalar(obj)) { |
| 48 | throw std::invalid_argument("Slice indices must be integers or None."); |
| 49 | } |
| 50 | return safe_to_int32(obj); |
| 51 | } |
| 52 | return default_val; |
| 53 | } |
| 54 | |
| 55 | void get_slice_params( |
| 56 | mx::ShapeElem& starts, |
no test coverage detected