LvArray
Classes | Namespaces | Functions
PyArray.hpp File Reference
#include "pythonForwardDeclarations.hpp"
#include "numpyHelpers.hpp"
#include "../Array.hpp"
#include "../Macros.hpp"
#include "../limits.hpp"
#include "../output.hpp"
#include "pythonHelpers.hpp"
#include <string>
#include <memory>
#include <typeindex>
Include dependency graph for PyArray.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  LvArray::python::internal::PyArrayWrapperBase
 Provides A virtual Python wrapper around an Array. More...
 
class  LvArray::python::internal::PyArrayWrapper< T, NDIM, PERM, INDEX_TYPE, BUFFER_TYPE >
 An implements the PyArrayWrapperBase interface for a particular Array type. More...
 

Namespaces

 LvArray
 The top level namespace.
 
 LvArray::python
 Contains all the Python code.
 

Functions

PyObject * LvArray::python::internal::create (std::unique_ptr< internal::PyArrayWrapperBase > &&array)
 Create a Python object corresponding to array. More...
 
template<typename T , int NDIM, typename PERM , typename INDEX_TYPE , template< typename > class BUFFER_TYPE>
std::enable_if_t< internal::canExportToNumpy< T >||(std::is_same< T, std::string >::value &&NDIM==1), PyObject *> LvArray::python::create (Array< T, NDIM, PERM, INDEX_TYPE, BUFFER_TYPE > &array)
 Create a Python object corresponding to array. More...
 
PyTypeObject * LvArray::python::getPyArrayType ()
 Return the Python type for the Array. More...
 

Function Documentation

◆ create()

PyObject* LvArray::python::internal::create ( std::unique_ptr< internal::PyArrayWrapperBase > &&  array)

Create a Python object corresponding to array.

Parameters
arrayThe Array to export to Python.
Returns
A Python object corresponding to array.