| 41 | { |
| 42 | public: |
| 43 | static Tensor Create(const nvcv::TensorShape &tshape, nvcv::DataType dtype, int rowalign = 0) |
| 44 | { |
| 45 | PyObject *otensor = capi().Tensor_Create(tshape.size(), &tshape[0], static_cast<NVCVDataType>(dtype), |
| 46 | static_cast<NVCVTensorLayout>(tshape.layout()), rowalign); |
| 47 | CheckCAPIError(); |
| 48 | NVCV_ASSERT(otensor != nullptr); |
| 49 | py::object pytensor = py::reinterpret_steal<py::object>(otensor); |
| 50 | |
| 51 | return Tensor(pytensor); |
| 52 | } |
| 53 | |
| 54 | static Tensor Create(const Shape &shape, nvcv::DataType dtype, nvcv::TensorLayout layout = nvcv::TENSOR_NONE, |
| 55 | int rowalign = 0) |
nothing calls this directly
no test coverage detected