HOPS
HOPS class reference
Classes | Public Member Functions | List of all members
hops::MHO_PyTableContainer< XTableType > Class Template Reference

python bindings for template MHO_TableContainer objects This extension which allows us to present the contents of the XTableType to python as a numpy array + python list objects for the axes. Changes made to the contents of numpy array will be exposed to the c++ side. However, no changes to the size/shape or axes of the array are supported. More...

#include <MHO_PyTableContainer.hh>

Public Member Functions

 MHO_PyTableContainer (MHO_ExtensibleElement *element)
 
virtual ~MHO_PyTableContainer ()
 
std::string GetClassName () const
 
py::list GetCoordinateAxis (size_t index)
 
py::dict GetCoordinateAxisMetaData (std::size_t index)
 
std::size_t GetDimension (std::size_t index) const
 
py::dict GetMetaData ()
 
py::array_t< typename XTableType::value_type > GetNumpyArray ()
 
std::size_t GetRank () const
 
void SetCoordinateAxisMetaData (std::size_t index, py::dict metadata)
 
void SetCoordinateLabel (std::size_t axis_index, std::size_t label_index, py::object label)
 
void SetMetaData (py::dict metadata)
 

Detailed Description

template<typename XTableType>
class hops::MHO_PyTableContainer< XTableType >

python bindings for template MHO_TableContainer objects This extension which allows us to present the contents of the XTableType to python as a numpy array + python list objects for the axes. Changes made to the contents of numpy array will be exposed to the c++ side. However, no changes to the size/shape or axes of the array are supported.

Author
J. Barrett - barre.nosp@m.ttj@.nosp@m.mit.e.nosp@m.du
Date
Thu Sep 23 16:03:48 2021 -0400

Constructor & Destructor Documentation

◆ MHO_PyTableContainer()

template<typename XTableType >
hops::MHO_PyTableContainer< XTableType >::MHO_PyTableContainer ( MHO_ExtensibleElement element)
inline

◆ ~MHO_PyTableContainer()

template<typename XTableType >
virtual hops::MHO_PyTableContainer< XTableType >::~MHO_PyTableContainer ( )
inlinevirtual

Member Function Documentation

◆ GetClassName()

template<typename XTableType >
std::string hops::MHO_PyTableContainer< XTableType >::GetClassName ( ) const
inline

◆ GetCoordinateAxis()

template<typename XTableType >
py::list hops::MHO_PyTableContainer< XTableType >::GetCoordinateAxis ( size_t  index)
inline
  • return the N-th axis as a python list object this conversion is NOT copy-free, but we get the same return type for all axis types

◆ GetCoordinateAxisMetaData()

template<typename XTableType >
py::dict hops::MHO_PyTableContainer< XTableType >::GetCoordinateAxisMetaData ( std::size_t  index)
inline

◆ GetDimension()

template<typename XTableType >
std::size_t hops::MHO_PyTableContainer< XTableType >::GetDimension ( std::size_t  index) const
inline

◆ GetMetaData()

template<typename XTableType >
py::dict hops::MHO_PyTableContainer< XTableType >::GetMetaData ( )
inline

◆ GetNumpyArray()

template<typename XTableType >
py::array_t< typename XTableType::value_type > hops::MHO_PyTableContainer< XTableType >::GetNumpyArray ( )
inline

*return the ND-array data block as a numpy array this transfer is copy-free

◆ GetRank()

template<typename XTableType >
std::size_t hops::MHO_PyTableContainer< XTableType >::GetRank ( ) const
inline

◆ SetCoordinateAxisMetaData()

template<typename XTableType >
void hops::MHO_PyTableContainer< XTableType >::SetCoordinateAxisMetaData ( std::size_t  index,
py::dict  metadata 
)
inline

◆ SetCoordinateLabel()

template<typename XTableType >
void hops::MHO_PyTableContainer< XTableType >::SetCoordinateLabel ( std::size_t  axis_index,
std::size_t  label_index,
py::object  label 
)
inline

◆ SetMetaData()

template<typename XTableType >
void hops::MHO_PyTableContainer< XTableType >::SetMetaData ( py::dict  metadata)
inline

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