Mantid
|
Functions | |
template<> | |
MANTID_PYTHONINTERFACE_CORE_DLL PyObject * | 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 * | 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 * | 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 * | 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 * | 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... | |
MANTID_PYTHONINTERFACE_CORE_DLL PyArray_Descr * | func_PyArray_Descr (const char *datadescr) |
MANTID_PYTHONINTERFACE_CORE_DLL PyObject * | func_PyArray_IterNew (PyArrayObject *arr) |
equivalent to macro PyArray_IterNew More... | |
MANTID_PYTHONINTERFACE_CORE_DLL PyArrayObject * | func_PyArray_NewFromDescr (const char *datadescr, int ndims, Py_intptr_t *dims) |
MANTID_PYTHONINTERFACE_CORE_DLL PyArrayObject * | func_PyArray_NewFromDescr (int datatype, int ndims, Py_intptr_t *dims) |
equivalent to macro PyArray_NewFromDescr More... | |
INSTANTIATE_MATRIX_WRAP (double) | |
INSTANTIATE_MATRIX_WRAP (float) | |
INSTANTIATE_MATRIX_WRAP (int) | |
template<typename ContainerType > | |
PyObject * | wrapWithNDArray (const ContainerType &cdata, const NumpyWrapMode mode) |
Defines the wrapWithNDArray specialization for Matrix container types. More... | |
template<typename ElementType > | |
PyObject * | wrapWithNDArray (const ElementType *carray, const int ndims, Py_intptr_t *dims, const NumpyWrapMode mode, const OwnershipMode oMode) |
Defines the wrapWithNDArray specialization for C array types. More... | |
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.
cvector | :: A reference to the cvector to clone |
Definition at line 75 of file CloneToNDArray.cpp.
References clone1D(), and func_PyArray_NewFromDescr().
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.
cvector | :: A reference to the cvector to clone |
Definition at line 42 of file CloneToNDArray.cpp.
References clone1D(), and cloneND().
Referenced by clone1D().
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.
Definition at line 52 of file CloneToNDArray.cpp.
References clone1D(), Mantid::PythonInterface::Converters::descr_ns(), and Mantid::PythonInterface::Converters::to_npy_datetime().
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.
A specialization exists for strings so that they simply create a standard python list.
carray | :: A reference to a carray |
ndims | :: The dimensionality of the array |
dims | :: The length of the arrays in each dimension |
Definition at line 98 of file CloneToNDArray.cpp.
References cloneND(), and func_PyArray_NewFromDescr().
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.
carray | :: A reference to a std::vector |
ndims | :: The dimensionality of the array |
dims | :: The length of the arrays in each dimension |
Definition at line 123 of file CloneToNDArray.cpp.
References cloneND().
PyArray_Descr * Mantid::PythonInterface::Converters::Impl::func_PyArray_Descr | ( | const char * | datadescr | ) |
Definition at line 38 of file NumpyFunctions.cpp.
References func_PyArray_Descr().
Referenced by func_PyArray_Descr(), and func_PyArray_NewFromDescr().
PyObject * Mantid::PythonInterface::Converters::Impl::func_PyArray_IterNew | ( | PyArrayObject * | arr | ) |
equivalent to macro PyArray_IterNew
Definition at line 17 of file NumpyFunctions.cpp.
PyArrayObject * Mantid::PythonInterface::Converters::Impl::func_PyArray_NewFromDescr | ( | const char * | datadescr, |
int | ndims, | ||
Py_intptr_t * | dims | ||
) |
Definition at line 26 of file NumpyFunctions.cpp.
References func_PyArray_Descr().
PyArrayObject * Mantid::PythonInterface::Converters::Impl::func_PyArray_NewFromDescr | ( | int | datatype, |
int | ndims, | ||
Py_intptr_t * | dims | ||
) |
equivalent to macro PyArray_NewFromDescr
Definition at line 19 of file NumpyFunctions.cpp.
Mantid::PythonInterface::Converters::Impl::INSTANTIATE_MATRIX_WRAP | ( | double | ) |
Mantid::PythonInterface::Converters::Impl::INSTANTIATE_MATRIX_WRAP | ( | float | ) |
Mantid::PythonInterface::Converters::Impl::INSTANTIATE_MATRIX_WRAP | ( | int | ) |
PyObject * Mantid::PythonInterface::Converters::Impl::wrapWithNDArray | ( | const ContainerType & | cdata, |
const NumpyWrapMode | mode | ||
) |
Defines the wrapWithNDArray specialization for Matrix container types.
Wraps a vector in a numpy array structure without copying the data
cdata | :: A reference to the Matrix wrap |
mode | :: A mode switch to define whether the final array is read only/read-write |
Definition at line 30 of file MatrixToNDArray.cpp.
References Mantid::PythonInterface::Converters::ReadOnly.
PyObject * Mantid::PythonInterface::Converters::Impl::wrapWithNDArray | ( | const ElementType * | carray, |
const int | ndims, | ||
Py_intptr_t * | dims, | ||
const NumpyWrapMode | mode, | ||
const OwnershipMode | oMode | ||
) |
Defines the wrapWithNDArray specialization for C array types.
Wraps an array in a numpy array structure without copying the data
carray | :: A pointer to the HEAD of the array |
ndims | :: The dimensionality of the array |
dims | :: The length of the arrays in each dimension |
mode | :: A mode switch to define whether the final array is read only/read-write |
oMode | :: A mode switch defining whether to transfer ownership of the returned array to python |
Definition at line 79 of file WrapWithNDArray.cpp.
References Mantid::PythonInterface::Converters::Python, Mantid::PythonInterface::Converters::ReadOnly, and wrapWithNDArray().
Referenced by Mantid::PythonInterface::Converters::WrapReadOnly::apply< ElementType >::createFromArray(), Mantid::PythonInterface::Converters::WrapReadWrite::apply< ElementType >::createFromArray(), wrapMeshWithNDArray(), and wrapWithNDArray().