Template Struct StdArrayPythonVisitor

Struct Documentation

template<typename array_type, bool NoProxy = false, class SliceAllocator = std::allocator<typename array_type::value_type>>
struct StdArrayPythonVisitor

Expose an std::array (a C++11 fixed-size array) from a given type.

Template Parameters:
  • array_type – std::array type to expose

  • NoProxy – When set to false, the elements will be copied when returned to Python.

  • SliceAllocator – Allocator type to use for slices of std::array type accessed using e.g. getitem[0:4] in Python. These slices are returned as std::vector (dynamic size).

Public Types

typedef array_type::value_type value_type

Public Static Functions

static inline ::boost::python::list tolist(array_type &self, const bool deep_copy)
static inline void expose(const std::string &class_name, const std::string &doc_string = "")
template<typename DerivedVisitor>
static inline void expose(const std::string &class_name, const bp::def_visitor<DerivedVisitor> &visitor)
template<typename DerivedVisitor>
static inline void expose(const std::string &class_name, const std::string &doc_string, const bp::def_visitor<DerivedVisitor> &visitor)