Mantid
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
boost::python::converter::object_manager_traits< Mantid::PythonInterface::NDArray > Struct Reference

Register ndarray as a type that manages a PyObject* internally. More...

#include <NDArray.h>

Public Member Functions

 BOOST_STATIC_CONSTANT (bool, is_specialized=true)
 

Static Public Member Functions

static python::detail::new_reference adopt (PyObject *obj)
 Create a boost::python object handle from the raw PyObject if it is a matching type. More...
 
static bool check (PyObject *obj)
 Check if the given object is an instance of the array type. More...
 
static PyTypeObject const * get_pytype ()
 Return the PyTypeObject for this type. More...
 

Detailed Description

Register ndarray as a type that manages a PyObject* internally.

Definition at line 55 of file NDArray.h.

Member Function Documentation

◆ adopt()

python::detail::new_reference boost::python::converter::object_manager_traits< Mantid::PythonInterface::NDArray >::adopt ( PyObject *  obj)
static

Create a boost::python object handle from the raw PyObject if it is a matching type.

Parameters
objA python object instance
Returns
A new_reference holder wrapped around the raw Python object or a nullptr if the types don't match

Definition at line 121 of file NDArray.cpp.

References obj.

◆ BOOST_STATIC_CONSTANT()

boost::python::converter::object_manager_traits< Mantid::PythonInterface::NDArray >::BOOST_STATIC_CONSTANT ( bool  ,
is_specialized  = true 
)

◆ check()

bool boost::python::converter::object_manager_traits< Mantid::PythonInterface::NDArray >::check ( PyObject *  obj)
static

Check if the given object is an instance of the array type.

Parameters
objA python object instance
Returns
True if the type matches numpy.NDArray

Definition at line 110 of file NDArray.cpp.

References obj.

◆ get_pytype()

PyTypeObject const * boost::python::converter::object_manager_traits< Mantid::PythonInterface::NDArray >::get_pytype ( )
static

Return the PyTypeObject for this type.

Returns
A pointer to the PyTypeObject defining the Python type

Definition at line 129 of file NDArray.cpp.


The documentation for this struct was generated from the following files: