casacore
|
Classes | |
struct | array_scalar_from_python |
Struct with static functions to convert a numpy array scalar to the templated type (e.g. More... | |
Functions | |
bool | PycArrayScalarCheck (PyObject *obj, int &type) |
Check if it is an array scalar object. More... | |
DataType | PycArrayScalarType (PyObject *obj_ptr) |
Get the data type of the array scalar object. More... | |
ValueHolder | makeScalar (PyObject *obj, int type) |
Make a scalar object. More... | |
void | register_convert_arrayscalars () |
Register all array scalar converters. More... | |
template<typename T > | |
T | getScalar (const ValueHolder &) |
Templated helper function to get a value from a ValueHolder. More... | |
template<> | |
Bool | getScalar (const ValueHolder &vh) |
Templated helper function to get a value from a ValueHolder. More... | |
|
inline |
Templated helper function to get a value from a ValueHolder.
Specialize for each type supported.
Definition at line 66 of file PycArrayNP.h.
References casacore::ValueHolder::asBool().
|
inline |
Templated helper function to get a value from a ValueHolder.
Specialize for each type supported.
Definition at line 66 of file PycArrayNP.h.
References casacore::ValueHolder::asBool().
ValueHolder casacore::python::numpy::makeScalar | ( | PyObject * | obj, |
int | type | ||
) |
Make a scalar object.
Referenced by casacore::python::numpy::array_scalar_from_python< T >::construct().
bool casacore::python::numpy::PycArrayScalarCheck | ( | PyObject * | obj, |
int & | type | ||
) |
Check if it is an array scalar object.
Referenced by casacore::python::numpy::array_scalar_from_python< T >::construct(), and casacore::python::numpy::array_scalar_from_python< T >::convertible().
DataType casacore::python::numpy::PycArrayScalarType | ( | PyObject * | obj_ptr | ) |
Get the data type of the array scalar object.
It returns TpBool, TpInt, TpFloat, or TpComplex. TpOther is returned if unrecognized.
void casacore::python::numpy::register_convert_arrayscalars | ( | ) |
Register all array scalar converters.