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

Converter that takes a std::vector and converts it into a flat numpy array. More...

#include <VectorToNDArray.h>

Public Member Functions

PyObject * operator() (const std::vector< ElementType > &cdata) const
 Converts a cvector to a numpy array. More...
 

Detailed Description

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

Converter that takes a std::vector and converts it into a flat numpy array.

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

Definition at line 26 of file VectorToNDArray.h.

Member Function Documentation

◆ operator()()

template<typename ElementType , typename ConversionPolicy >
PyObject * Mantid::PythonInterface::Converters::VectorToNDArray< ElementType, ConversionPolicy >::operator() ( const std::vector< ElementType > &  cdata) const
inline

Converts a cvector to a numpy array.

Parameters
cdata:: A const reference to a vector
Returns
A new PyObject that wraps the vector in a numpy array

Definition at line 32 of file VectorToNDArray.h.


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