HomeSort by relevance Sort by last modified time
    Searched full:py_array (Results 1 - 4 of 4) sorted by null

  /external/tensorflow/tensorflow/compiler/xla/python/
numpy_bridge.cc 386 PyArrayObject* py_array = reinterpret_cast<PyArrayObject*>(o); local
387 int rank = PyArray_NDIM(py_array);
390 dimensions[i] = PyArray_DIM(py_array, i);
392 int np_type = PyArray_TYPE(py_array);
396 CopyNumpyArrayToLiteral(np_type, py_array, literal.get()));
404 Status CopyNumpyArrayToLiteral(int np_type, PyArrayObject* py_array,
408 CopyNumpyArrayToLiteral<bool>(py_array, literal);
411 CopyNumpyArrayToLiteral<int32>(py_array, literal);
414 CopyNumpyArrayToLiteral<int64>(py_array, literal);
417 CopyNumpyArrayToLiteral<uint8>(py_array, literal)
    [all...]
numpy_bridge.h 90 Status CopyNumpyArrayToLiteral(int np_type, PyArrayObject* py_array,
94 PyArrayObject* py_array);
97 void CopyNumpyArrayToLiteral(PyArrayObject* py_array, Literal* literal) {
98 NativeT* source = static_cast<NativeT*>(PyArray_DATA(py_array));
100 std::copy(source, source + PyArray_SIZE(py_array), dest.data());
104 void CopyLiteralToNumpyArray(const Literal& literal, PyArrayObject* py_array) {
105 NativeT* dest = static_cast<NativeT*>(PyArray_DATA(py_array));
  /external/tensorflow/tensorflow/python/client/
tf_session_helper.cc 130 PyObject* py_array; local
131 s = TF_TensorToPyArray(std::move(tf_outputs_safe[i]), &py_array);
136 py_outputs_safe.emplace_back(make_safe(py_array));
263 PyObject* py_array; local
264 s = TF_TensorToPyArray(std::move(output_vals_safe[i]), &py_array);
269 py_outputs_safe.emplace_back(make_safe(py_array));
  /external/tensorflow/tensorflow/python/lib/core/
ndarray_tensor.cc 350 PyArrayObject* py_array = local
353 Status s = CopyTF_TensorStringsToPyArray(tensor.get(), nelems, py_array);
357 } else if (static_cast<size_t>(PyArray_NBYTES(py_array)) !=
359 return errors::Internal("ndarray was ", PyArray_NBYTES(py_array),
363 memcpy(PyArray_DATA(py_array), TF_TensorData(tensor.get()),
364 PyArray_NBYTES(py_array));

Completed in 202 milliseconds