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

Function IsPyInt

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

Source from the content-addressed store, hash-verified

43}
44
45bool IsPyInt(PyObject* obj) {
46#if PY_MAJOR_VERSION >= 3
47 return PyLong_Check(obj) ||
48 PyIsInstance(obj, &PyIntegerArrType_Type); // NumPy integers
49#else
50 return PyInt_Check(obj) || PyLong_Check(obj) ||
51 PyIsInstance(obj, &PyIntegerArrType_Type); // NumPy integers
52#endif
53}
54
55bool IsPyDouble(PyObject* obj) {
56 return PyIsInstance(obj, &PyDoubleArrType_Type); // NumPy double type.

Callers 1

InferShapeAndTypeFunction · 0.85

Calls 1

PyIsInstanceFunction · 0.85

Tested by

no test coverage detected