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

Function IsPyDimension

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

Source from the content-addressed store, hash-verified

98}
99
100bool IsPyDimension(PyObject* obj) {
101 const char* tp_name = obj->ob_type->tp_name;
102 if (strcmp(tp_name, "Dimension") != 0) return false;
103 bool ret = str_util::EndsWith(
104 PyRepr(PyType(obj)),
105 "tensorflow.python.framework.tensor_shape.Dimension'>");
106 return ret;
107}
108
109// Sets *elem to a NEW reference to an element in seq on success.
110// REQUIRES: PySequence_Check(seq) && PySequence_Length(seq) > 0.

Callers 4

InferShapeAndTypeFunction · 0.85
ConvertOneInt64Function · 0.85
ConvertOneUint64Function · 0.85
ConvertOneInt32Function · 0.85

Calls 3

EndsWithFunction · 0.85
PyReprFunction · 0.85
PyTypeFunction · 0.85

Tested by

no test coverage detected