ArrayShapeEncoder.Shape 方法

定义

对数组形状进行编码。

public:
 void Shape(int rank, System::Collections::Immutable::ImmutableArray<int> sizes, System::Collections::Immutable::ImmutableArray<int> lowerBounds);
public void Shape(int rank, System.Collections.Immutable.ImmutableArray<int> sizes, System.Collections.Immutable.ImmutableArray<int> lowerBounds);
member this.Shape : int * System.Collections.Immutable.ImmutableArray<int> * System.Collections.Immutable.ImmutableArray<int> -> unit
Public Sub Shape (rank As Integer, sizes As ImmutableArray(Of Integer), lowerBounds As ImmutableArray(Of Integer))

参数

rank
Int32

数组中的维度数(应为 1 个或多个)。

sizes
ImmutableArray<Int32>

维度大小。 数组可能短于 rank 但时间不长。

lowerBounds
ImmutableArray<Int32>

维度下限,或 default(ImmutableArray<T>) 将所有 rank 下限设置为 0。 数组可能短于 rank 但时间不长。

例外

rank 不在 [1, 0xffff] 范围内,小于 sizes.Length或小于 lowerBounds.Length

sizesnull

适用于