Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
PyzCppHelpers.cxx File Reference
Include dependency graph for PyzCppHelpers.cxx:

Functions

PyObjectBoolNot (PyObject *value)
 
PyObjectCallPyObjMethod (PyObject *obj, const char *meth)
 Set of helper functions that are invoked from the C++ implementation of pythonizations.
 
PyObjectCallPyObjMethod (PyObject *obj, const char *meth, PyObject *arg1)
 
bool CheckEndianessFromTypestr (const std::string &typestr)
 Check whether endianess in type string matches the endianess of ROOT.
 
PyObjectGetArrayInterface (PyObject *obj)
 Get Numpy array interface and perform error handling.
 
std::string GetCppTypeFromNumpyType (const std::string &dtype)
 Convert Numpy data-type string to the according C++ data-type string.
 
unsigned long long GetDataPointerFromArrayInterface (PyObject *obj)
 Get data pointer from Numpy array interface and perform error handling.
 
unsigned int GetDatatypeSizeFromTypestr (const std::string &typestr)
 Get size of data type in bytes from Numpy type string.
 
std::string GetScopedFinalNameFromPyObject (const PyObject *pyobj)
 
TClassGetTClass (const PyObject *pyobj)
 
std::string GetTypestrFromArrayInterface (PyObject *obj)
 Get type string from Numpy array interface and perform error handling.
 

Function Documentation

◆ BoolNot()

PyObject * BoolNot ( PyObject value)

Definition at line 34 of file PyzCppHelpers.cxx.

◆ CallPyObjMethod() [1/2]

PyObject * CallPyObjMethod ( PyObject obj,
const char *  meth 
)

Set of helper functions that are invoked from the C++ implementation of pythonizations.

Definition at line 22 of file PyzCppHelpers.cxx.

◆ CallPyObjMethod() [2/2]

PyObject * CallPyObjMethod ( PyObject obj,
const char *  meth,
PyObject arg1 
)

Definition at line 28 of file PyzCppHelpers.cxx.

◆ CheckEndianessFromTypestr()

bool CheckEndianessFromTypestr ( const std::string &  typestr)

Check whether endianess in type string matches the endianess of ROOT.

Parameters
[in]typestrNumpy type string
Returns
Boolean indicating whether they match

Definition at line 149 of file PyzCppHelpers.cxx.

◆ GetArrayInterface()

PyObject * GetArrayInterface ( PyObject obj)

Get Numpy array interface and perform error handling.

Parameters
[in]objPyObject with array interface dictionary
Returns
Array interface dictionary

Definition at line 85 of file PyzCppHelpers.cxx.

◆ GetCppTypeFromNumpyType()

std::string GetCppTypeFromNumpyType ( const std::string &  dtype)

Convert Numpy data-type string to the according C++ data-type string.

Parameters
[in]dtypeNumpy data-type string
Returns
C++ data-type string

If the input data-tyep is not known, the function returns an empty string.

Definition at line 62 of file PyzCppHelpers.cxx.

◆ GetDataPointerFromArrayInterface()

unsigned long long GetDataPointerFromArrayInterface ( PyObject obj)

Get data pointer from Numpy array interface and perform error handling.

Parameters
[in]objArray interface dictionary
Returns
Data pointer

Definition at line 103 of file PyzCppHelpers.cxx.

◆ GetDatatypeSizeFromTypestr()

unsigned int GetDatatypeSizeFromTypestr ( const std::string &  typestr)

Get size of data type in bytes from Numpy type string.

Parameters
[in]typestrNumpy type string
Returns
Size in bytes

Definition at line 138 of file PyzCppHelpers.cxx.

◆ GetScopedFinalNameFromPyObject()

std::string GetScopedFinalNameFromPyObject ( const PyObject pyobj)

Definition at line 51 of file PyzCppHelpers.cxx.

◆ GetTClass()

TClass * GetTClass ( const PyObject pyobj)

Definition at line 46 of file PyzCppHelpers.cxx.

◆ GetTypestrFromArrayInterface()

std::string GetTypestrFromArrayInterface ( PyObject obj)

Get type string from Numpy array interface and perform error handling.

Parameters
[in]objArray interface dictionary
Returns
Type string

Definition at line 117 of file PyzCppHelpers.cxx.