MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / ToPython

Function ToPython

python/mod_cvcuda/nvcv/Array.cpp:300–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300static py::object ToPython(const nvcv::ArrayData &arrayData, py::object owner)
301{
302 py::object out;
303
304 auto data = arrayData.cast<nvcv::ArrayData>();
305 if (!data)
306 {
307 throw std::runtime_error("Only tensors with pitch-linear data can be exported");
308 }
309
310 DLPackTensor dlTensor(*data);
311 return ExternalBuffer::Create(std::move(dlTensor), owner);
312}
313
314py::object Array::cuda() const
315{

Callers 1

cudaMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected