Mantid
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Mantid::PythonInterface::Converters::MatrixToNDArray< ElementType, ConversionPolicy > Struct Template Reference

Converter that takes a Mantid Matrix and converts it into a numpy array. More...

#include <MatrixToNDArray.h>

Public Member Functions

PyObject * operator() (const Kernel::Matrix< ElementType > &cmatrix) const
 Operator to convert a matrix to a numpy array. More...
 

Detailed Description

template<typename ElementType, typename ConversionPolicy>
struct Mantid::PythonInterface::Converters::MatrixToNDArray< ElementType, ConversionPolicy >

Converter that takes a Mantid Matrix and converts it into a numpy array.

The type of conversion is specified by another struct/class that contains a static member create.

Definition at line 26 of file MatrixToNDArray.h.

Member Function Documentation

◆ operator()()

template<typename ElementType , typename ConversionPolicy >
PyObject * Mantid::PythonInterface::Converters::MatrixToNDArray< ElementType, ConversionPolicy >::operator() ( const Kernel::Matrix< ElementType > &  cmatrix) const
inline

Operator to convert a matrix to a numpy array.

Parameters
cmatrix:: A reference to matrix
Returns
A new PyObject* that points to a numpy array

Definition at line 32 of file MatrixToNDArray.h.

References Mantid::Kernel::Matrix< T >::size().


The documentation for this struct was generated from the following file: