Mantid
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
Mantid::PythonInterface::Converters::WrapReadWrite::apply< ElementType > Struct Template Reference

#include <WrapWithNDArray.h>

Static Public Member Functions

static PyObject * create1D (const std::vector< ElementType > &cdata)
 Returns a read-write Numpy array wrapped around an existing vector. More...
 
static PyObject * createFromArray (const ElementType *cdata, const int ndims, Py_intptr_t *dims)
 Returns a read-only Numpy array wrapped around an existing array. More...
 

Detailed Description

template<typename ElementType>
struct Mantid::PythonInterface::Converters::WrapReadWrite::apply< ElementType >

Definition at line 70 of file WrapWithNDArray.h.

Member Function Documentation

◆ create1D()

template<typename ElementType >
static PyObject * Mantid::PythonInterface::Converters::WrapReadWrite::apply< ElementType >::create1D ( const std::vector< ElementType > &  cdata)
inlinestatic

Returns a read-write Numpy array wrapped around an existing vector.

Parameters
cdata:: A reference to vector
Returns

Definition at line 77 of file WrapWithNDArray.h.

References Mantid::PythonInterface::Converters::WrapReadWrite::apply< ElementType >::createFromArray().

◆ createFromArray()

template<typename ElementType >
static PyObject * Mantid::PythonInterface::Converters::WrapReadWrite::apply< ElementType >::createFromArray ( const ElementType *  cdata,
const int  ndims,
Py_intptr_t *  dims 
)
inlinestatic

Returns a read-only Numpy array wrapped around an existing array.

The template type here refers to the C-array's element type

Parameters
cdata:: A pointer to the HEAD of a data array
ndims:: The number of dimensions
dims:: An array of size ndims specifying the sizes of each of the dimensions
Returns

Definition at line 91 of file WrapWithNDArray.h.

References Mantid::PythonInterface::Converters::ReadWrite, and Mantid::PythonInterface::Converters::Impl::wrapWithNDArray().

Referenced by Mantid::PythonInterface::Converters::WrapReadWrite::apply< ElementType >::create1D().


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