Public Member Functions
boost::numpy::multi_iter Class Reference

A boost.python "object manager" (subclass of object) for PyArray_MultiIter. More...

#include <ufunc.hpp>

List of all members.

Public Member Functions

 BOOST_PYTHON_FORWARD_OBJECT_CONSTRUCTORS (multi_iter, python::object)
char * get_data (int n) const
 Return a pointer to the element of the nth broadcasted array.
int const get_nd () const
 Return the number of dimensions of the broadcasted array expression.
Py_intptr_t const * get_shape () const
 Return the shape of the broadcasted array expression as an array of integers.
void next ()
 Increment the iterator.
bool not_done () const
 Check if the iterator is at its end.
Py_intptr_t const shape (int n) const
 Return the shape of the broadcasted array expression in the nth dimension.

Detailed Description

A boost.python "object manager" (subclass of object) for PyArray_MultiIter.

multi_iter is a Python object, but a very low-level one. It should generally only be used in loops of the form:

  while (iter.not_done()) {
      ...
      iter.next();
  }
Todo:
I can't tell if this type is exposed in Python anywhere; if it is, we should use that name. It's more dangerous than most object managers, however - maybe it actually belongs in a detail namespace?

Definition at line 39 of file ufunc.hpp.


Member Function Documentation

char * boost::numpy::multi_iter::get_data ( int  n) const

Return a pointer to the element of the nth broadcasted array.

Definition at line 48 of file src/ufunc.cpp.

int const boost::numpy::multi_iter::get_nd ( ) const

Return the number of dimensions of the broadcasted array expression.

Definition at line 53 of file src/ufunc.cpp.

Py_intptr_t const * boost::numpy::multi_iter::get_shape ( ) const

Return the shape of the broadcasted array expression as an array of integers.

Definition at line 58 of file src/ufunc.cpp.

Increment the iterator.

Definition at line 38 of file src/ufunc.cpp.

Check if the iterator is at its end.

Definition at line 43 of file src/ufunc.cpp.

Py_intptr_t const boost::numpy::multi_iter::shape ( int  n) const

Return the shape of the broadcasted array expression in the nth dimension.

Definition at line 63 of file src/ufunc.cpp.


The documentation for this class was generated from the following files:


boost_numpy
Author(s): Jim Bosch, Ankit Daftery
autogenerated on Fri Aug 28 2015 10:10:40