👎Deprecated since 0.16.0:
The wrappers of the array iterator API are deprecated, please use ndarray’s iterators like Lanes
and Zip
instead.
Expand description
Wrapper of the array iterator API.
This module exposes two iterators: NpySingleIter
and NpyMultiIter
.
As general recommendation, the usage of ndarray’s facilities for iteration should be preferred:
- They are more performant due to being transparent to the Rust compiler, using statically known dimensions
without dynamic dispatch into NumPy’s C implementation, c.f.
ndarray::iter::Iter
. - They are more flexible as to which parts of the array iterated in which order, c.f.
ndarray::iter::Lanes
. - They can zip up to six arrays together and operate on their elements using multiple threads, c.f.
ndarray::Zip
.
To safely use these types, extension functions should take PyReadonlyArray
as arguments
which provide the as_array
method to acquire an ndarray::ArrayView
.
Structs
NpyMultiIterDeprecated
An iterator over multiple arrays, construced by
NpyMultiIterBuilder
.NpyMultiIterBuilderDeprecated
Builder for
NpyMultiIter
.NpySingleIterDeprecated
An iterator over a single array, construced by
NpySingleIterBuilder
.NpySingleIterBuilderDeprecated
Builder of
NpySingleIter
.RODeprecated
Represents the iterator mode where the last array is readonly.
RWDeprecated
Represents the iterator mode where the last array is readwrite.
Enums
NpyIterFlagDeprecated
Flags for constructing an iterator.
Traits
IterModeDeprecated
Iterator mode for single iterator
MultiIterModeDeprecated
A combinator type that represents the mode of an iterator.
MultiIterModeWithManyArraysDeprecated
Represents the iterator mode where at least two arrays are iterated.