Mantid
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
CloneToNDArray.cpp File Reference
#include "MantidPythonInterface/core/Converters/CloneToNDArray.h"
#include "MantidPythonInterface/core/Converters/DateAndTime.h"
#include "MantidPythonInterface/core/Converters/NDArrayTypeIndex.h"
#include "MantidPythonInterface/core/Converters/NumpyFunctions.h"
#include "MantidTypes/Core/DateAndTime.h"
#include <boost/python/list.hpp>
#include <string>
#include <numpy/arrayobject.h>

Go to the source code of this file.

Namespaces

namespace  Mantid
 Helper class which provides the Collimation Length for SANS instruments.
 
namespace  Mantid::PythonInterface
 
namespace  Mantid::PythonInterface::Converters
 
namespace  Mantid::PythonInterface::Converters::Impl
 

Macros

#define INSTANTIATE_CLONE(ElementType)
 
#define INSTANTIATE_CLONE1D(ElementType)    template DLLExport PyObject *clone1D<ElementType>(const std::vector<ElementType> &cvector);
 
#define INSTANTIATE_CLONEND(ElementType)    template DLLExport PyObject *cloneND<ElementType>(const ElementType *, const int ndims, Py_intptr_t *dims);
 
#define NO_IMPORT_ARRAY
 
#define PY_ARRAY_UNIQUE_SYMBOL   CORE_ARRAY_API
 

Functions

template<>
MANTID_PYTHONINTERFACE_CORE_DLL PyObject * Mantid::PythonInterface::Converters::Impl::clone1D (const std::vector< bool > &cvector)
 Specialisation for vector<bool> that stores the underlying data differently Returns a new numpy array with the a copy of the data vector of booleans. More...
 
template<typename ElementType >
PyObject * Mantid::PythonInterface::Converters::Impl::clone1D (const std::vector< ElementType > &cvector)
 Returns a new numpy array with the a copy of the data from 1D vector with the exception of string elements where a Python list is produced. More...
 
template<>
MANTID_PYTHONINTERFACE_CORE_DLL PyObject * Mantid::PythonInterface::Converters::Impl::clone1D (const std::vector< Types::Core::DateAndTime > &cvector)
 Specialisation for vector<DateAndTime> that stores the underlying data differently Returns a new numpy array with the a copy of the data vector of np.datetime64. More...
 
template<typename ElementType >
PyObject * Mantid::PythonInterface::Converters::Impl::cloneND (const ElementType *carray, const int ndims, Py_intptr_t *dims)
 Returns a new numpy array with the a copy of the data from array. More...
 
template<>
PyObject * Mantid::PythonInterface::Converters::Impl::cloneND (const std::string *carray, const int ndims, Py_intptr_t *dims)
 Returns a new python list of strings from the given array of strings. More...
 

Macro Definition Documentation

◆ INSTANTIATE_CLONE

#define INSTANTIATE_CLONE (   ElementType)
Value:
INSTANTIATE_CLONE1D(ElementType) \
INSTANTIATE_CLONEND(ElementType)
#define INSTANTIATE_CLONE1D(ElementType)

Definition at line 147 of file CloneToNDArray.cpp.

◆ INSTANTIATE_CLONE1D

#define INSTANTIATE_CLONE1D (   ElementType)     template DLLExport PyObject *clone1D<ElementType>(const std::vector<ElementType> &cvector);

Definition at line 141 of file CloneToNDArray.cpp.

◆ INSTANTIATE_CLONEND

#define INSTANTIATE_CLONEND (   ElementType)     template DLLExport PyObject *cloneND<ElementType>(const ElementType *, const int ndims, Py_intptr_t *dims);

Definition at line 144 of file CloneToNDArray.cpp.

◆ NO_IMPORT_ARRAY

#define NO_IMPORT_ARRAY

Definition at line 19 of file CloneToNDArray.cpp.

◆ PY_ARRAY_UNIQUE_SYMBOL

#define PY_ARRAY_UNIQUE_SYMBOL   CORE_ARRAY_API

Definition at line 18 of file CloneToNDArray.cpp.