Struct np.NDChunkIter<T>
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
The foreach-able returned by
nditer_chunks<T>(NDArray, bool, char). See np.NDRefIter<T>
for the ref struct, disposal, re-enumeration and iteration-order rationale,
which apply identically.
The yielded Span<T> points straight at the operand, so writes go through and the span is invalidated by the next step.
public readonly struct np.NDChunkIter<T> where T : unmanaged
Type Parameters
TThe array's exact element type.
- Inherited Members
- Extension Methods
Methods
GetEnumerator()
Builds a fresh iterator; foreach disposes it for you.
public np.NDChunkIter<T>.Enumerator GetEnumerator()
Returns
Exceptions
- NotSupportedException
The layout's inner loop is not unit-stride — a stepped view such as
a[":, ::2"]. A Span<T> is contiguous by definition and cannot describe it. The single-operand inner stride is fixed for the whole iteration, so this is detected up front and never surfaces mid-loop. Use nditer<T>(NDArray, bool, char), which handles any stride, or iterate a.copy().