TECA
The Toolkit for Extreme Climate Analysis
teca_py_array Namespace Reference

Codes for interfacing with numpy arrays. More...

Functions

bool append (teca_variant_array *varr, PyObject *obj)
 Append values from the object to the variant array. More...
 
bool copy (teca_variant_array *varr, PyObject *obj)
 Copy values from the object into variant array. More...
 
bool set (teca_variant_array *varr, unsigned long i, PyObject *obj)
 Set i'th element of the variant array to the value of the object. More...
 
p_teca_variant_array new_variant_array (PyObject *obj)
 Construct a new variant array and initialize it with a copy of the object. More...
 
template<typename NT >
PyArrayObject * new_object (teca_variant_array_impl< NT > *varrt)
 Construct a new numpy array initialized with the contents of the variant array. More...
 
PyArrayObject * new_object (teca_variant_array *varr)
 Construct a new numpy array initialized with the contents of the variant array. More...
 

Detailed Description

Codes for interfacing with numpy arrays.

Function Documentation

◆ append()

bool teca_py_array::append ( teca_variant_array varr,
PyObject *  obj 
)

Append values from the object to the variant array.

◆ copy()

bool teca_py_array::copy ( teca_variant_array varr,
PyObject *  obj 
)

Copy values from the object into variant array.

◆ new_object() [1/2]

PyArrayObject* teca_py_array::new_object ( teca_variant_array varr)

Construct a new numpy array initialized with the contents of the variant array.

◆ new_object() [2/2]

template<typename NT >
PyArrayObject* teca_py_array::new_object ( teca_variant_array_impl< NT > *  varrt)

Construct a new numpy array initialized with the contents of the variant array.

◆ new_variant_array()

p_teca_variant_array teca_py_array::new_variant_array ( PyObject *  obj)

Construct a new variant array and initialize it with a copy of the object.

◆ set()

bool teca_py_array::set ( teca_variant_array varr,
unsigned long  i,
PyObject *  obj 
)

Set i'th element of the variant array to the value of the object.