26#ifndef PYRAP_PYCARRAYNP_H
27#define PYRAP_PYCARRAYNP_H
30#include <boost/python.hpp>
31#include <boost/python/object.hpp>
32#include <casacore/casa/Containers/ValueHolder.h>
33#include <casacore/casa/Arrays/Array.h>
34#include <numpy/arrayobject.h>
40#define PYC_USE_PYARRAY "numpy"
41#include <casacore/python/Converters/PycArrayComH.h>
133 boost::python::type_id<T>());
147 boost::python::converter::rvalue_from_python_stage1_data* data) {
148 using namespace boost::python;
149 void*
storage = ((converter::rvalue_from_python_storage<T>*)data)->storage.bytes;
Complex asComplex() const
Bool asBool() const
Get the value.
DComplex asDComplex() const
ValueHolder makeScalar(PyObject *obj, int type)
Make a scalar object.
T getScalar(const ValueHolder &)
Templated helper function to get a value from a ValueHolder.
void register_convert_arrayscalars()
Register all array scalar converters.
bool PycArrayScalarCheck(PyObject *obj, int &type)
Check if it is an array scalar object.
DataType PycArrayScalarType(PyObject *obj_ptr)
Get the data type of the array scalar object.
For temporary backward namespace compatibility, use casa as alias for casacore.
T * storage()
If you really, really, need a "raw" pointer to the beginning of the storage area this will give it to...
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size).
bool Bool
Define the standard types used by Casacore.
unsigned long long uInt64
static void * convertible(PyObject *obj_ptr)
Check if it is a type we can convert.
static void construct(PyObject *obj_ptr, boost::python::converter::rvalue_from_python_stage1_data *data)
Constructs a T from a Python array scalar object.
array_scalar_from_python()