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

Function PyCheckTensor

paddle/utils/pybind.cc:27–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25// PyTypeObject* PyFloat_Type;
26PyTypeObject* PyLong_Type;
27bool PyCheckTensor(PyObject* obj) {
28 if (!p_tensor_type) {
29 return false;
30 }
31 return PyObject_TypeCheck(obj, p_tensor_type);
32}
33
34void ShareTensor(PyObject* src, PyObject* dst) {
35 if (PyObject_TypeCheck(src, p_tensor_type) &&

Callers 15

loadMethod · 0.85
loadMethod · 0.85
operator()Method · 0.85
_PySlice_GetIndicesFunction · 0.85
ParseIndexFunction · 0.85
dealWithValuesFunction · 0.85
CastPyArg2ScalarFunction · 0.85
operator()Method · 0.85
tensor__setitem_dygraphFunction · 0.85
tensor__add__methodFunction · 0.85
tensor__sub__methodFunction · 0.85
tensor__rsub__methodFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected