11#include <boost/python/detail/prefix.hpp>
14namespace PythonInterface {
33 const std::pair<size_t, size_t> matrixDims = cmatrix.
size();
34 Py_intptr_t dims[2] = {
static_cast<Py_intptr_t
>(matrixDims.first),
static_cast<Py_intptr_t
>(matrixDims.second)};
35 using policy =
typename ConversionPolicy::template apply<ElementType>;
36 return policy::createFromArray(&(cmatrix[0][0]), 2, dims);
#define DLLExport
Definitions of the DLLImport compiler directives for MSVC.
std::pair< size_t, size_t > size() const
Access matrix sizes.
Helper class which provides the Collimation Length for SANS instruments.
Converter that takes a Mantid Matrix and converts it into a numpy array.
PyObject * operator()(const Kernel::Matrix< ElementType > &cmatrix) const
Operator to convert a matrix to a numpy array.