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

Function NdarrayToTensor

tensorflow/python/lib/core/ndarray_tensor.cc:539–546  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

537 TF_Status* status);
538
539Status NdarrayToTensor(PyObject* obj, Tensor* ret) {
540 Safe_TF_TensorPtr tf_tensor = make_safe(static_cast<TF_Tensor*>(nullptr));
541 Status s = PyArrayToTF_Tensor(obj, &tf_tensor);
542 if (!s.ok()) {
543 return s;
544 }
545 return TF_TensorToTensor(tf_tensor.get(), ret);
546}
547
548Status TensorToNdarray(const Tensor& t, PyObject** ret) {
549 TF_Status* status = TF_NewStatus();

Callers 4

RunCallableHelperFunction · 0.85
RunCppShapeInferenceImplFunction · 0.85
NumpyToTFE_TensorHandleFunction · 0.85
DoCallPyFuncFunction · 0.85

Calls 5

PyArrayToTF_TensorFunction · 0.85
TF_TensorToTensorFunction · 0.85
make_safeFunction · 0.70
okMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected