|
casacore
|
Classes | |
| struct | ArrayCopy |
| Copy/convert the array data as needed. More... | |
| struct | ArrayCopy< Complex > |
| struct | ArrayCopy< DComplex > |
| struct | ArrayCopy< String > |
| struct | array_scalar_from_python |
| Struct with static functions to convert a numpy array scalar to the templated type (e.g. More... | |
Functions | |
| Bool | PycArrayCheck (PyObject *obj_ptr) |
| Check if the PyObject is an array object. More... | |
| Bool | isImported () |
| Check if the API is or can be imported. More... | |
| Bool | canImport () |
| Bool | importArray () |
| void | loadAPI () |
| ValueHolder | makeArray (PyObject *obj_ptr, Bool copyData) |
| Convert the python array to a Casacore array in the ValueHolder. More... | |
| Array< String > | ArrayCopyStr_toArray (const IPosition &shape, void *data, size_t slen) |
| Array< String > | ArrayCopyUnicode_toArray (const IPosition &shape, void *data, size_t slen) |
| template<typename T > | |
| boost::python::object | makePyArrayObject (casacore::Array< T > const &arr) |
| Convert a Casacore array to a Python array object. More... | |
| 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... | |
| template<> | |
| Char | getScalar (const ValueHolder &vh) |
| Templated helper function to get a value from a ValueHolder. More... | |
| template<> | |
| uChar | getScalar (const ValueHolder &vh) |
| Templated helper function to get a value from a ValueHolder. More... | |
| template<> | |
| Short | getScalar (const ValueHolder &vh) |
| Templated helper function to get a value from a ValueHolder. More... | |
| template<> | |
| uShort | getScalar (const ValueHolder &vh) |
| Templated helper function to get a value from a ValueHolder. More... | |
| template<> | |
| Int | getScalar (const ValueHolder &vh) |
| Templated helper function to get a value from a ValueHolder. More... | |
| template<> | |
| uInt | getScalar (const ValueHolder &vh) |
| Templated helper function to get a value from a ValueHolder. More... | |
| template<> | |
| Long | getScalar (const ValueHolder &vh) |
| Templated helper function to get a value from a ValueHolder. More... | |
| template<> | |
| uLong | getScalar (const ValueHolder &vh) |
| Templated helper function to get a value from a ValueHolder. More... | |
| template<> | |
| Int64 | getScalar (const ValueHolder &vh) |
| Templated helper function to get a value from a ValueHolder. More... | |
| template<> | |
| uInt64 | getScalar (const ValueHolder &vh) |
| Templated helper function to get a value from a ValueHolder. More... | |
| template<> | |
| Float | getScalar (const ValueHolder &vh) |
| Templated helper function to get a value from a ValueHolder. More... | |
| template<> | |
| Double | getScalar (const ValueHolder &vh) |
| Templated helper function to get a value from a ValueHolder. More... | |
| template<> | |
| Complex | getScalar (const ValueHolder &vh) |
| Templated helper function to get a value from a ValueHolder. More... | |
| template<> | |
| DComplex | getScalar (const ValueHolder &vh) |
| Templated helper function to get a value from a ValueHolder. More... | |
| Array<String> casacore::python::numpy::ArrayCopyStr_toArray | ( | const IPosition & | shape, |
| void * | data, | ||
| size_t | slen | ||
| ) |
| Array<String> casacore::python::numpy::ArrayCopyUnicode_toArray | ( | const IPosition & | shape, |
| void * | data, | ||
| size_t | slen | ||
| ) |
|
inline |
Definition at line 35 of file PycArrayNP.h.
|
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(), casacore::ValueHolder::asComplex(), casacore::ValueHolder::asDComplex(), casacore::ValueHolder::asDouble(), casacore::ValueHolder::asFloat(), casacore::ValueHolder::asInt(), casacore::ValueHolder::asShort(), casacore::ValueHolder::asuChar(), casacore::ValueHolder::asuInt(), and casacore::ValueHolder::asuShort().
|
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 68 of file PycArrayNP.h.
References casacore::ValueHolder::asShort().
|
inline |
Templated helper function to get a value from a ValueHolder.
Specialize for each type supported.
Definition at line 70 of file PycArrayNP.h.
References casacore::ValueHolder::asuChar().
|
inline |
Templated helper function to get a value from a ValueHolder.
Specialize for each type supported.
Definition at line 72 of file PycArrayNP.h.
|
inline |
Templated helper function to get a value from a ValueHolder.
Specialize for each type supported.
Definition at line 74 of file PycArrayNP.h.
References casacore::ValueHolder::asuShort().
|
inline |
Templated helper function to get a value from a ValueHolder.
Specialize for each type supported.
Definition at line 76 of file PycArrayNP.h.
References casacore::ValueHolder::asInt().
|
inline |
Templated helper function to get a value from a ValueHolder.
Specialize for each type supported.
Definition at line 78 of file PycArrayNP.h.
References casacore::ValueHolder::asuInt().
|
inline |
Templated helper function to get a value from a ValueHolder.
Specialize for each type supported.
Definition at line 80 of file PycArrayNP.h.
References casacore::ValueHolder::asInt().
|
inline |
Templated helper function to get a value from a ValueHolder.
Specialize for each type supported.
Definition at line 82 of file PycArrayNP.h.
References casacore::ValueHolder::asuInt().
|
inline |
Templated helper function to get a value from a ValueHolder.
Specialize for each type supported.
Definition at line 84 of file PycArrayNP.h.
References casacore::ValueHolder::asInt().
|
inline |
Templated helper function to get a value from a ValueHolder.
Specialize for each type supported.
Definition at line 86 of file PycArrayNP.h.
References casacore::ValueHolder::asuInt().
|
inline |
Templated helper function to get a value from a ValueHolder.
Specialize for each type supported.
Definition at line 88 of file PycArrayNP.h.
References casacore::ValueHolder::asFloat().
|
inline |
Templated helper function to get a value from a ValueHolder.
Specialize for each type supported.
Definition at line 90 of file PycArrayNP.h.
References casacore::ValueHolder::asDouble().
|
inline |
Templated helper function to get a value from a ValueHolder.
Specialize for each type supported.
Definition at line 92 of file PycArrayNP.h.
References casacore::ValueHolder::asComplex().
|
inline |
Templated helper function to get a value from a ValueHolder.
Specialize for each type supported.
Definition at line 94 of file PycArrayNP.h.
References casacore::ValueHolder::asDComplex().
| Bool casacore::python::numpy::importArray | ( | ) |
| Bool casacore::python::numpy::isImported | ( | ) |
Check if the API is or can be imported.
PySys_GetObject uses char* instead of const char*, so use a cast.
Definition at line 44 of file PycArrayComCC.h.
References PYC_USE_PYARRAY.
Referenced by PycArrayCheck().
| void casacore::python::numpy::loadAPI | ( | ) |
Definition at line 54 of file PycArrayComCC.h.
References importArray(), and PYC_USE_PYARRAY.
Referenced by PycArrayCheck().
| ValueHolder casacore::python::numpy::makeArray | ( | PyObject * | obj_ptr, |
| Bool | copyData | ||
| ) |
Convert the python array to a Casacore array in the ValueHolder.
If copyData is True, the array data is always copied. Otherwise only if needed.
| boost::python::object casacore::python::numpy::makePyArrayObject | ( | casacore::Array< T > const & | arr | ) |
Convert a Casacore array to a Python array object.
| 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.
1.8.5