Template Function Pennylane::NanoBindings::Utils::createNumpyArrayFromVector(std::vector<VectorT>&&)

Function Documentation

template<typename VectorT>
nb::ndarray<VectorT, nb::numpy, nb::c_contig> Pennylane::NanoBindings::Utils::createNumpyArrayFromVector(std::vector<VectorT> &&data)

Create a 1D ndarray from a vector of data.

Template Parameters

VectorT – Data type of the vector elements

Parameters

data – Vector containing the data to transfer

Returns

nb::ndarray<VectorT, nb::numpy, nb::c_contig> 1D array with copied data