MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / PyRepr

Function PyRepr

tensorflow/python/lib/core/py_seq_tensor.cc:86–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84const char* ConvertOneString(PyObject* v, string* out);
85
86string PyRepr(PyObject* obj) {
87 if (obj == nullptr) {
88 return "<null>";
89 }
90 Safe_PyObjectPtr repr_obj = make_safe(PyObject_Repr(obj));
91 if (repr_obj) {
92 string repr_str;
93 if (ConvertOneString(repr_obj.get(), &repr_str) == nullptr) {
94 return repr_str;
95 }
96 }
97 return "<error computing repr()>";
98}
99
100bool IsPyDimension(PyObject* obj) {
101 const char* tp_name = obj->ob_type->tp_name;

Callers 2

IsPyDimensionFunction · 0.85
InferShapeAndTypeFunction · 0.85

Calls 3

ConvertOneStringFunction · 0.85
make_safeFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected