NumCpp  2.4.2
A Templatized Header Only C++ Implementation of the Python NumPy Library
nc::boostPythonInterface Namespace Reference

Data Structures

class  BoostNdarrayHelper
 Helper class for ndarray. More...
 

Functions

template<typename dtype >
NdArray< dtype > boost2Nc (const boost::python::numpy::ndarray &inArray)
 
template<typename T >
std::vector< T > list2vector (const boost::python::list &inList)
 
template<class Key , class Value >
boost::python::dict map2dict (const std::map< Key, Value > &inMap)
 
template<typename dtype >
boost::python::numpy::ndarray nc2Boost (const NdArray< dtype > &inArray)
 
template<typename T >
boost::python::list vector2list (std::vector< T > &inVector)
 

Function Documentation

◆ boost2Nc()

template<typename dtype >
NdArray<dtype> nc::boostPythonInterface::boost2Nc ( const boost::python::numpy::ndarray &  inArray)
inline

Converts from a boost ndarray to a NumCpp NdArray<T>

Parameters
inArray
Returns
NdArray<T>

◆ list2vector()

template<typename T >
std::vector<T> nc::boostPythonInterface::list2vector ( const boost::python::list &  inList)
inline

converts a boost python list to a std::vector

Parameters
inList
Returns
std::vector<T>

◆ map2dict()

template<class Key , class Value >
boost::python::dict nc::boostPythonInterface::map2dict ( const std::map< Key, Value > &  inMap)
inline

converts a std::map in to a boost python dictionary

Parameters
inMap
Returns
boost::python::dict

◆ nc2Boost()

template<typename dtype >
boost::python::numpy::ndarray nc::boostPythonInterface::nc2Boost ( const NdArray< dtype > &  inArray)
inline

Converts from a NumCpp NdArray<T> to a boost ndarray

Parameters
inArray
Returns
ndarray

◆ vector2list()

template<typename T >
boost::python::list nc::boostPythonInterface::vector2list ( std::vector< T > &  inVector)
inline

converts a std::vector to a boost python list

Parameters
inVector
Returns
boost::python::list