MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / ToPyObject

Function ToPyObject

paddle/fluid/pybind/eager_utils.cc:1028–1036  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1026}
1027
1028PyObject* ToPyObject(bool value) {
1029 if (value) {
1030 Py_INCREF(Py_True);
1031 return Py_True;
1032 } else {
1033 Py_INCREF(Py_False);
1034 return Py_False;
1035 }
1036}
1037
1038PyObject* ToPyObject(int value) { return PyLong_FromLong(value); }
1039

Callers 4

operator()Method · 0.70
CalcScopeCacheKeyFunction · 0.70
GetProgramIdFromAttrsFunction · 0.70

Calls 15

InstanceFunction · 0.85
GetTensorFromPyObjectFunction · 0.85
GetItemFromArgsOrKWArgsFunction · 0.85
ConvertToDistTensorFunction · 0.85
c_strMethod · 0.80
inc_refMethod · 0.80
is_dist_tensorMethod · 0.80
castFunction · 0.50
emptyMethod · 0.45
countMethod · 0.45
atMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected