Tensor index
| 307 | |
| 308 | // Tensor index |
| 309 | bool PyTensorIndexCheck(PyObject* obj) { |
| 310 | return PySlice_Check(obj) || PyLong_Check(obj) || obj == Py_Ellipsis || obj == Py_None |
| 311 | || PyTensor_Check(obj) || PySequence_Check(obj) || PyUnicode_Check(obj) |
| 312 | || numpy::PyArrayCheckLongScalar(obj); |
| 313 | } |
| 314 | TensorIndex PyUnpackTensorIndex(PyObject* obj) { |
| 315 | TensorIndex tensor_index; |
| 316 | // Obvious single-entry cases. |
no test coverage detected