| 2143 | } |
| 2144 | |
| 2145 | bool CheckResourceVariable(PyObject* item) { |
| 2146 | if (tensorflow::swig::IsResourceVariable(item)) { |
| 2147 | tensorflow::Safe_PyObjectPtr handle( |
| 2148 | PyObject_GetAttrString(item, "_handle")); |
| 2149 | return EagerTensor_CheckExact(handle.get()); |
| 2150 | } |
| 2151 | |
| 2152 | return false; |
| 2153 | } |
| 2154 | |
| 2155 | bool IsNumberType(PyObject* item) { |
| 2156 | #if PY_MAJOR_VERSION >= 3 |
no test coverage detected