11#include <boost/python/detail/prefix.hpp>
15namespace PythonInterface {
26template <
typename ElementType,
typename ConversionPolicy>
struct VectorToNDArray {
32 inline PyObject *
operator()(
const std::vector<ElementType> &cdata)
const {
34 using policy =
typename ConversionPolicy::template apply<ElementType>;
35 return policy::create1D(cdata);
Helper class which provides the Collimation Length for SANS instruments.
Converter that takes a std::vector and converts it into a flat numpy array.
PyObject * operator()(const std::vector< ElementType > &cdata) const
Converts a cvector to a numpy array.