template<class T, class Storage, npy_uint32 rw_flag = NPY_ITER_READWRITE>
class mds_utils::python::numpy::NDArrayIterator< T, Storage, rw_flag >
Iterator on a NumPy ndarray.
It is a Random Access Iterator. It wraps (i.e. adapts) the NumPy C-API implementation of the iterator for ndarray objects. When a cast is needed, it operates on a casted copy of the original array.
- Template Parameters
-
T | The output type in C++ code. It may be obtained by cast, if the data type in Python is not the same. |
Storage | Ordering used for accessing the array. It can be different from the actual ordering of the ndarray object. It can be either c_storage or fortran_storage. |
rw_flag | Read-write flag. It can assume one of three values:
- NPY_ITER_READWRITE: (default) the iterator will be used for reading and writing from/into the array.
- NPY_ITER_READONLY: the iterator will only read from the array.
- NPY_ITER_WRITEONLY: the iterator will only write into the array.
|
- Author
- Michele De Stefano
- Date
- 21/11/2014
Definition at line 116 of file array_iterator.hpp.