Template Function Pennylane::alignedNumpyArray

Function Documentation

template<typename T>
auto Pennylane::alignedNumpyArray(CPUMemoryModel memory_model, std::size_t size, bool zeroInit = false) -> py::array

Create an aligned numpy array for a given type, memory model and array size.

Template Parameters

T – Datatype of numpy array to create

Parameters
  • memory_model – Memory model to use

  • size – Size of the array to create

Returns

Numpy array