|
| typedef view_type::const_iterator | const_iterator |
| typedef view_type::const_pointer | const_pointer |
| typedef view_type::const_reference | const_reference |
| typedef view_type::const_traverser | const_traverser |
| typedef view_type::difference_type | difference_type |
| typedef view_type::difference_type_1 | difference_type_1 |
| typedef view_type::iterator | iterator |
| typedef NumpyAnyArray::difference_type | permutation_type |
| typedef view_type::pointer | pointer |
| typedef view_type::reference | reference |
| typedef view_type::size_type | size_type |
| typedef view_type::traverser | traverser |
| typedef view_type::value_type | value_type |
| typedef MultiArrayView< N, typename ArrayTraits::value_type, Stride > | view_type |
| enum | ActualDimension |
| typedef StridedScanOrderIterator< actual_dimension, T, T const &, T const * > | const_iterator |
| typedef const value_type * | const_pointer |
| typedef const value_type & | const_reference |
| typedef vigra::detail::MultiIteratorChooser< StridedArrayTag >::template Traverser< actual_dimension, T, Tconst &, Tconst * >::type | const_traverser |
| typedef MultiArrayShape< actual_dimension >::type | difference_type |
| typedef MultiArrayIndex | difference_type_1 |
| typedef StridedScanOrderIterator< actual_dimension, T, T &, T * > | iterator |
| typedef difference_type | key_type |
| typedef MultiArray< N, T > | matrix_type |
| typedef value_type * | pointer |
| typedef value_type & | reference |
| typedef difference_type | size_type |
| typedef vigra::detail::MultiIteratorChooser< StridedArrayTag >::template Traverser< actual_dimension, T, T &, T * >::type | traverser |
| typedef T | value_type |
| typedef MultiArrayView< N, T, StridedArrayTag > | view_type |
|
typedef ArrayVector< npy_intp > | difference_type |
| | difference type
|
|
| bool | hasData () const |
| MultiArrayView & | init (const U &init) |
| void | makeCopy (PyObject *obj, bool strict=false) |
| bool | makeReference (const NumpyAnyArray &array, bool strict=false) |
| bool | makeReference (PyObject *obj, bool=false) |
| void | makeReferenceUnchecked (PyObject *obj) |
| void | makeUnsafeReference (const view_type &multiArrayView) |
| template<class U, class S> |
| | NumpyArray (const MultiArrayView< N, U, S > &other) |
| | NumpyArray (const NumpyAnyArray &other, bool createCopy=false) |
| | NumpyArray (const NumpyArray &other, bool createCopy=false) |
| | NumpyArray (difference_type const &shape, std::string const &order="") |
| | NumpyArray (PyObject *obj=0, bool createCopy=false) |
| | NumpyArray (TaggedShape const &tagged_shape) |
| template<class U, class S> |
| NumpyArray & | operator= (const MultiArrayView< N, U, S > &other) |
| NumpyArray & | operator= (const NumpyAnyArray &other) |
| NumpyArray & | operator= (const NumpyArray &other) |
| template<class U, class S> |
| NumpyArray & | operator= (const NumpyArray< N, U, S > &other) |
| template<int K> |
| TinyVector< npy_intp, K > | permuteLikewise () const |
| template<class U> |
| ArrayVector< U > | permuteLikewise (ArrayVector< U > const &data) const |
| template<class U, int K> |
| TinyVector< U, K > | permuteLikewise (TinyVector< U, K > const &data) const |
| void | reshape (difference_type const &shape) |
| void | reshapeIfEmpty (difference_type const &shape, std::string message="") |
| void | reshapeIfEmpty (TaggedShape tagged_shape, std::string message="") |
| const difference_type & | shape () const |
| difference_type_1 | shape (difference_type_1 n) const |
| difference_type | strideOrdering () const |
| bool | all () const |
| bool | any () const |
| iterator | begin () |
| MultiArrayView< N-1, T, StridedArrayTag > | bindAt (difference_type_1 m, difference_type_1 d) const |
| MultiArrayView< N, typename ExpandElementResult< T >::type, StridedArrayTag > | bindElementChannel (difference_type_1 i) const |
| MultiArrayView< N-M, T, StridedArrayTag > | bindOuter (const TinyVector< Index, M > &d) const |
| difference_type_1 | coordinateToScanOrderIndex (const difference_type &d) const |
| void | copy (const MultiArrayView &rhs) |
| pointer | data () const |
| MultiArrayView< 1, T, StridedArrayTag > | diagonal () const |
| difference_type_1 | elementCount () const |
| iterator | end () |
| MultiArrayView< N+1, typename ExpandElementResult< T >::type, StridedArrayTag > | expandElements (difference_type_1 d) const |
| bool | hasData () const |
| difference_type_1 | height () const |
| MultiArrayView & | init (const U &init) |
| MultiArrayView< N+1, T, StridedArrayTag > | insertSingletonDimension (difference_type_1 i) const |
| bool | isInside (difference_type const &p) const |
| bool | isOutside (difference_type const &p) const |
| bool | isUnstrided (unsigned int dimension=N-1) const |
| void | meanVariance (U *mean, U *variance) const |
| void | minmax (T *minimum, T *maximum) const |
| | MultiArrayView () |
| MultiArrayView< N, Multiband< value_type >, StridedArrayTag > | multiband () const |
| NormTraits< MultiArrayView >::NormType | norm (int type=2, bool useSquaredNorm=true) const |
| | operator MultiArrayView< N, T, StridedArrayTag > () const |
| bool | operator!= (MultiArrayView< N, U, C1 > const &rhs) const |
| reference | operator() (difference_type_1 x) |
| MultiArrayView & | operator*= (MultiArrayView< N, U, C1 > const &rhs) |
| MultiArrayView & | operator+= (MultiArrayView< N, U, C1 > const &rhs) |
| MultiArrayView & | operator-= (MultiArrayView< N, U, C1 > const &rhs) |
| MultiArrayView & | operator/= (MultiArrayView< N, U, C1 > const &rhs) |
| bool | operator== (MultiArrayView< N, U, C1 > const &rhs) const |
| reference | operator[] (const difference_type &d) |
| MultiArrayView< N, T, StridedArrayTag > | permuteStridesAscending () const |
| MultiArrayView< N, T, StridedArrayTag > | permuteStridesDescending () const |
| U | product () const |
| void | reset () |
| difference_type | scanOrderIndexToCoordinate (difference_type_1 d) const |
| const difference_type & | shape () const |
| difference_type_1 | size () const |
| NormTraits< MultiArrayView >::SquaredNormType | squaredNorm () const |
| const difference_type & | stride () const |
| MultiArrayView< N, T, StridedArrayTag > | stridearray (const difference_type &s) const |
| difference_type | strideOrdering () const |
| MultiArrayView | subarray (difference_type p, difference_type q) const |
| U | sum () const |
| void | swap (MultiArrayView &other) |
| void | swapData (MultiArrayView rhs) |
| MultiArrayView< N, T, StridedArrayTag > | transpose () const |
| traverser | traverser_begin () |
| traverser | traverser_end () |
| difference_type_1 | width () const |
| python_ptr | axistags () const |
| int | dtype () const |
| template<class Shape> |
| NumpyAnyArray | getitem (Shape start, Shape stop) const |
| bool | hasData () const |
| void | makeCopy (PyObject *obj, PyTypeObject *type=0) |
| bool | makeReference (PyObject *obj, PyTypeObject *type=0) |
| MultiArrayIndex | ndim () const |
| | NumpyAnyArray (NumpyAnyArray const &other, bool createCopy=false, PyTypeObject *type=0) |
| | NumpyAnyArray (PyObject *obj=0, bool createCopy=false, PyTypeObject *type=0) |
| NumpyAnyArray & | operator= (NumpyAnyArray const &other) |
| PyArrayObject * | pyArray () const |
| PyObject * | pyObject () const |
| difference_type | shape () const |
| MultiArrayIndex | spatialDimensions () const |
| difference_type | strideOrdering () const |
template<unsigned int N, class T, class Stride = StridedArrayTag>
class vigra::NumpyArray< N, T, Stride >
Provide the MultiArrayView interface for a Python array.
This class inherits from both MultiArrayView and NumpyAnyArray in order to support easy and safe application of VIGRA functions to Python arrays.
#include <vigra/numpy_array.hxx>
Namespace: vigra
template<unsigned int N, class T, class Stride = StridedArrayTag>
| NumpyArray |
( |
PyObject * | obj = 0, |
|
|
bool | createCopy = false ) |
|
explicit |
Construct from a given PyObject pointer. When the given python object is NULL, the internal python array will be NULL and hasData() will return false.
Otherwise, the function attempts to create a new reference to the given Python object, unless copying is forced by setting createCopy to true. If either of this fails, the function throws an exception. This will not happen if isReferenceCompatible(obj) (in case of creating a new reference) or isCopyCompatible(obj) (in case of copying) have returned true beforehand.