Struct Shape.Enumerator
- Namespace
- NumSharp
- Assembly
- NumSharp.dll
The dimension enumerator GetEnumerator() returns: a cursor over the shape's own dimension array.
public struct Shape.Enumerator
- Inherited Members
Remarks
Footgun: it reads the array the shape shares with its arrays (Core never writes into it, see
Shape's sharing rule); a caller that writes into shape.dimensions while enumerating sees the
write.
Properties
Current
The dimension at the cursor; valid only after MoveNext() returned true.
public long Current { get; }
Property Value
Exceptions
- IndexOutOfRangeException
Read before the first MoveNext() or after the last.
Methods
MoveNext()
Advances to the next dimension.
public bool MoveNext()
Returns
- bool
True while a dimension remains; false at the end (and for a 0-d or uninitialized shape at once).