Proxem.NumNet by Guillaume Wenzek, Jocelyn Coulmance, Thomas Perrais, Jean-Marc Marty

<PackageReference Include="Proxem.NumNet" Version="1.5.0" />

 Strided<Type>

public class Strided<Type>
public Flags Flags

Information about the underlying data storage

public int Offset

The index of the first value of this Array in the underlying data

public int[] Shape

Shape of the arrays, ie the size of each axis of the array.

public int[] Stride

For each axis the number of step needed in the underlying data array to increase this axis coordinate of 1. Contrary to NumPy the stride isn't measured in byte. See wikipedia for mor details on stride.

public int NDim { get; }

The number of dimensions in this Array

public int Size { get; }

The number of elements in this Array

public Strided()

public int GetAbsoluteIndex(int index, int axis)

Compute absolute values for negative indices

public int RavelIndices(int i0)

Convert coordinates to offset

public int RavelIndices(int i0, int i1)

public int RavelIndices(int i0, int i1, int i2)

public int RavelIndices(int[] indices)

protected int RavelIndicesStart(Slice[] slices)

public int[] UnravelIndex(int i, int[] result = null)

Yields the coordinate of the i-th value traversed by this tensor enumerator. Examples: var t = Tensor.Zeros(20, 15); var coord = t.Unravel(43); // = new int[]{2, 13};