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

#include <WrapWithNDArray.h>

Static Public Member Functions

static PyObject * create1D (const std::vector< ElementType > &cdata)
 Returns a read-only 1D Numpy array wrapped around an existing container that knows its size. 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::WrapReadOnly::apply< ElementType >

Definition at line 36 of file WrapWithNDArray.h.

Member Function Documentation

◆ create1D()

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

Returns a read-only 1D Numpy array wrapped around an existing container that knows its size.

Parameters
cdata:: A const reference to an object that can be wrapped
Returns

Definition at line 43 of file WrapWithNDArray.h.

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

◆ createFromArray()

template<typename ElementType >
static PyObject * Mantid::PythonInterface::Converters::WrapReadOnly::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 57 of file WrapWithNDArray.h.

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

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


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