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

Function TensorToNdarray

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

Source from the content-addressed store, hash-verified

546}
547
548Status TensorToNdarray(const Tensor& t, PyObject** ret) {
549 TF_Status* status = TF_NewStatus();
550 Safe_TF_TensorPtr tf_tensor = make_safe(TF_TensorFromTensor(t, status));
551 Status tf_status = StatusFromTF_Status(status);
552 TF_DeleteStatus(status);
553 if (!tf_status.ok()) {
554 return tf_status;
555 }
556 return TF_TensorToPyArray(std::move(tf_tensor), ret);
557}
558
559} // namespace tensorflow

Callers 2

RunCallableHelperFunction · 0.85
MakeArgTupleFunction · 0.85

Calls 7

TF_NewStatusFunction · 0.85
TF_TensorFromTensorFunction · 0.85
StatusFromTF_StatusFunction · 0.85
TF_DeleteStatusFunction · 0.85
TF_TensorToPyArrayFunction · 0.85
make_safeFunction · 0.70
okMethod · 0.45

Tested by

no test coverage detected